A vector of objects. More...
Public Member Functions | |
| ObjectList (void) | |
| Initialise vector. | |
| ObjectList (FileIO *file) | |
| Read object vector from the given file. | |
| T * | operator[] (int position) |
| Operator to index the vector. | |
| void | salvage (FileIO *file) |
| Read the vector from the given file. | |
| void | purge (FileIO *file) |
| Write the vector to the given file. | |
| int | size (void) |
| Return the length of the vector. | |
| void | assignFilePositions (FileBlockQueue *list) |
| Assign the file position of each element list in the index (e.g. position of word list to extract later). | |
| void | buildHashTable (void) |
| Build hash table for fast look up. | |
| T * | lookup (char *name) |
| Return the object with the given name. | |
Protected Attributes | |
| int | _size |
| The length of the vector. | |
| T ** | _objectList |
| The vector pointer. | |
| HashTable< char *, T * > * | _objectHash |
| The hash table pointer. | |
Friends | |
| class | BuildList< T > |
A vector of objects.
This class provides the methods to store and manipulate a vector of objects.
1.6.1