#include <DatabaseManager.h>
Public Member Functions | |
DatabaseManager () | |
virtual | ~DatabaseManager () |
T * | AddItem (T *item) |
T * | AddItemHead (T *item) |
void | RemoveItem (T *item) |
void | RemoveItem (void) |
void | BeginIterate (void) |
void | EndIterate (void) |
T * | Iterate (void) |
T * | FindItem (void *keyData) |
int | Tidy (void) |
void | SetEnableFastFind (bool enable=false) |
void | SetHashFromDataFunc (t_HashFromDataFunc *pfunc) |
void | SetHashFromKeyFunc (t_HashFromKeyFunc *pfunc) |
void | SetCompareDataWithKeyFunc (t_CompareDataWithKeyFunc *pfunc) |
|
The ctor performs some basic initialisation |
|
The dtor makes sure everything is tidy |
|
Adds an item pointer to the list. This does not allocate an item as this is left to the user to do
|
|
Starts the iteration of the items in the list from the start and works forwards |
|
Starts the iteration of the items in the list from the end and works backwards |
|
This finds an item using the t_CompareDataWithKeyFunc as a callback. If the fast find algorithm is used then the t_HashFromKeyFunc is also used
|
|
Iterates through the items in the list
|
|
Removes the current iterated item but does not free the item as this is left to the user to do |
|
Removes an item pointer from the list but does not free the item as this is left to the user to do
|
|
A speed enhancement for the database is to turn on the fast find algorithm. This algorithm uses several data hashing functions defined by the user that are then used to index the data.
|