The next changes for the Dictionary class are some improvements in its implementation. One of these changes is to integrate the use count into the value of the key map instead of using a separate vector for the use counts of each entry. Putting the use count into the key map value will require the use of iterators to get to the use count since they will no longer be in an indexed vector.
The debug text function (which will be changed to a put stream operator function) will need to use an iterator to look up a key to get the use count. When using iterators, the debug text function will also need to convert the key to upper case for case sensitive dictionaries, which implies that it would also need a case sensitive flag argument like the add and remove function.
This made me realize that passing a case sensitive flag to all of these functions was not the best design. A better design is to have a case sensitive flag as a member variable initialized once when the dictionary is constructed. Using arguments allows different case sensitivities on a dictionary and this will cause problems. A case sensitive member was added, the constructors were added or modified, and the case sensitive arguments were removed.
[branch stl commit b78217c5a4]
Saturday, October 4, 2014
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
All comments and feedback welcomed, whether positive or negative.
(Anonymous comments are allowed, but comments with URL links or unrelated comments will be removed.)