BasicDataStructures::OrderedList< data_type, key_type > Class Template Reference

The ordered list class is a list which keeps its elements in order. More...

#include <OrderedList.h>

List of all members.

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)=defaultComparison) 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


Detailed Description

template<class data_type, class key_type>
class BasicDataStructures::OrderedList< data_type, key_type >

The ordered list class is a list which keeps its elements in order.

Unlike some implementation, the keys are not considered part of the data


Member Function Documentation

template<class data_type, class key_type>
bool BasicDataStructures::OrderedList< data_type, key_type >::HasData key_type  key,
int(*)(data_type, key_type)  comparisonFunction = defaultComparison
 

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


The documentation for this class was generated from the following file:
Generated on Thu Mar 30 23:54:51 2006 for RakNet by  doxygen 1.4.6-NO