Thursday, October 2, 2014

Dictionary – Start STL Transition

The Dictionary class will be next to have its debug text function changed to a put stream operator function.  Unlike the RPN List and Token classes, access to some of private variables will be necessary, so the put stream operator function will need to be a friend function.  First, these private variables needs to be changed from Qt classes to STL classes.  Other dependencies on Qt will also be removed.  This was started with these changes:
  • Changed the quint16 type to the standard uint16_t type.
  • Changed the use count list member to a standard vector.
  • Changed the free stack member to a standard stack.
  • Replaced the use of the Q_UNUSED macro to just (void), which is just as simple.
  • Replaced the use of Qt case sensitivity enumerators with a simple yes/no case sensitive enumeration class.  The enumerators were never passed to Qt functions, so there was really no reason to use the Qt enumerators.
The next change was to change the QStringList for the list of keys with a standard vector or standard strings.  The string access function was changed to return a standard string, which required the change of the return value of the various operator text functions accessing dictionaries to a standard string.  Several conversions from and to QString values were temporarily added as needed until more variables are changed to standard strings (though some will be needed when interfacing to the GUI).

[branch stl commit 84875530db]