#include <OrderedList.h>
Public Member Functions | |
bool | HasData (key_type key, int(*comparisonFunction)(data_type, key_type)=defaultComparison) |
unsigned | GetIndexFromKey (key_type key, bool *objectExists, int(*comparisonFunction)(data_type, key_type)) const |
data_type | GetElementFromKey (key_type key, int(*comparisonFunction)(data_type, key_type)=defaultComparison) |
bool | InsertElement (data_type data, int(*comparisonFunction)(data_type, key_type)=defaultComparison) |
bool | InsertElement (data_type data, key_type key, int(*comparisonFunction)(data_type, key_type)=defaultComparison) |
void | RemoveElement (key_type key, int(*comparisonFunction)(data_type, key_type)=defaultComparison) |
data_type & | operator[] (unsigned int position) const |
void | RemoveElementAtIndex (unsigned index) |
void | Clear (void) |
unsigned | Size (void) const |
Static Public Member Functions | |
static int | defaultComparison (data_type a, key_type b) |
Protected Attributes | |
BasicDataStructures::List< data_type > | dataList |
Unlike some implementation, the keys are not considered part of the data
|
comparisonFunction must take a key_type and a data_type and return <0, ==0, or >0 If the data type has comparison operators already defined then you can just use defaultComparison |