SLikeNet 0.1.3

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
DataStructures::OrderedList< key_type, data_type, default_comparison_function > Class Template Reference

`#include <slikenet/DS_OrderedList.h>`

Inheritance diagram for DataStructures::OrderedList< key_type, data_type, default_comparison_function >:

## Public Member Functions

| OrderedList ()
| ~OrderedList ()
| OrderedList (const OrderedList &original_copy)
OrderedList & | operator= (const OrderedList &original_copy)
bool | HasData (const key_type &key, int(*cf)(const key_type &, const data_type &)=default_comparison_function) const
unsigned | GetIndexFromKey (const key_type &key, bool *objectExists, int(*cf)(const key_type &, const data_type &)=default_comparison_function) const
data_type | GetElementFromKey (const key_type &key, int(*cf)(const key_type &, const data_type &)=default_comparison_function) const
bool | GetElementFromKey (const key_type &key, data_type &element, int(*cf)(const key_type &, const data_type &)=default_comparison_function) const
unsigned | Insert (const key_type &key, const data_type &data, bool assertOnDuplicate, const char *file, unsigned int line, int(*cf)(const key_type &, const data_type &)=default_comparison_function)
unsigned | Remove (const key_type &key, int(*cf)(const key_type &, const data_type &)=default_comparison_function)
unsigned | RemoveIfExists (const key_type &key, int(*cf)(const key_type &, const data_type &)=default_comparison_function)
data_type & | operator[] (const unsigned int position) const
void | RemoveAtIndex (const unsigned index)
void | InsertAtIndex (const data_type &data, const unsigned index, const char *file, unsigned int line)
void | InsertAtEnd (const data_type &data, const char *file, unsigned int line)
void | RemoveFromEnd (const unsigned num=1)
void | Clear (bool doNotDeallocate, const char *file, unsigned int line)
unsigned | Size (void) const

## Static Public Member Functions

static void | IMPLEMENT_DEFAULT_COMPARISON (void)

## Protected Attributes

DataStructures::List< data_type > | orderedList

## Detailed Description

### template<class key_type, class data_type, int(*)(const key_type &, const data_type &) default_comparison_function = defaultOrderedListComparison<key_type, data_type>>
class DataStructures::OrderedList< key_type, data_type, default_comparison_function >

Note
  IMPORTANT! If you use defaultOrderedListComparison then call IMPLEMENT_DEFAULT_COMPARISON or you will get an unresolved external linker error.

Definition at line 40 of file DS_OrderedList.h.

## Constructor & Destructor Documentation

template<class key_type , class data_type , int(*)(const key_type &, const data_type &) default_comparison_function>

DataStructures::OrderedList< key_type, data_type, default_comparison_function >::OrderedList | ( |  | ) |

Definition at line 73 of file DS_OrderedList.h.

template<class key_type , class data_type , int(*)(const key_type &, const data_type &) default_comparison_function>

DataStructures::OrderedList< key_type, data_type, default_comparison_function >::~OrderedList | ( |  | ) |

Definition at line 78 of file DS_OrderedList.h.

References _FILE_AND_LINE_.

template<class key_type , class data_type , int(*)(const key_type &, const data_type &) default_comparison_function>

DataStructures::OrderedList< key_type, data_type, default_comparison_function >::OrderedList | ( | const OrderedList< key_type, data_type, default_comparison_function > & | original_copy | ) |

Definition at line 84 of file DS_OrderedList.h.

References DataStructures::OrderedList< key_type, data_type, default_comparison_function >::orderedList.

## Member Function Documentation

template<class key_type , class data_type , int(*)(const key_type &, const data_type &) default_comparison_function>

void DataStructures::OrderedList< key_type, data_type, default_comparison_function >::Clear | ( | bool | doNotDeallocate,
|  | const char * | file,
|  | unsigned int | line
| ) |  |

Definition at line 262 of file DS_OrderedList.h.

template<class key_type, class data_type, int(*)(const key_type &, const data_type &) default_comparison_function>

data_type DataStructures::OrderedList< key_type, data_type, default_comparison_function >::GetElementFromKey | ( | const key_type & | key,
|  | int(*)(const key_type &, const data_type &) | cf = `default_comparison_function`
| ) |  | const

Definition at line 105 of file DS_OrderedList.h.

References RakAssert.

template<class key_type, class data_type, int(*)(const key_type &, const data_type &) default_comparison_function>

bool DataStructures::OrderedList< key_type, data_type, default_comparison_function >::GetElementFromKey | ( | const key_type & | key,
|  | data_type & | element,
|  | int(*)(const key_type &, const data_type &) | cf = `default_comparison_function`
| ) |  | const

Definition at line 114 of file DS_OrderedList.h.

template<class key_type, class data_type, int(*)(const key_type &, const data_type &) default_comparison_function>

unsigned DataStructures::OrderedList< key_type, data_type, default_comparison_function >::GetIndexFromKey | ( | const key_type & | key,
|  | bool * | objectExists,
|  | int(*)(const key_type &, const data_type &) | cf = `default_comparison_function`
| ) |  | const

Definition at line 124 of file DS_OrderedList.h.

References RakAssert.

Referenced by SLNet::VariableDeltaSerializer::DirtyAndFreeVarsAssociatedWithReceipt(), SLNet::StringTable::EncodeString(), SLNet::VariableDeltaSerializer::FreeVarsAssociatedWithReceipt(), and SLNet::CommandParserInterface::GetRegisteredCommand().

template<class key_type, class data_type, int(*)(const key_type &, const data_type &) default_comparison_function>

bool DataStructures::OrderedList< key_type, data_type, default_comparison_function >::HasData | ( | const key_type & | key,
|  | int(*)(const key_type &, const data_type &) | cf = `default_comparison_function`
| ) |  | const

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

Definition at line 97 of file DS_OrderedList.h.

template<class key_type, class data_type, int(*)(const key_type &, const data_type &) default_comparison_function = defaultOrderedListComparison<key_type, data_type>>

static void DataStructures::OrderedList< key_type, data_type, default_comparison_function >::IMPLEMENT_DEFAULT_COMPARISON | ( | void |  | ) |

inlinestatic

Definition at line 43 of file DS_OrderedList.h.

Referenced by GridSectorizer::Init().

template<class key_type, class data_type, int(*)(const key_type &, const data_type &) default_comparison_function>

unsigned DataStructures::OrderedList< key_type, data_type, default_comparison_function >::Insert | ( | const key_type & | key,
|  | const data_type & | data,
|  | bool | assertOnDuplicate,
|  | const char * | file,
|  | unsigned int | line,
|  | int(*)(const key_type &, const data_type &) | cf = `default_comparison_function`
| ) |  |

Definition at line 176 of file DS_OrderedList.h.

References RakAssert.

Referenced by SLNet::StringTable::AddString(), SLNet::CommandParserInterface::RegisterCommand(), DataStructures::Table::SortTable(), and SLNet::VariableDeltaSerializer::StoreChangedVariablesList().

template<class key_type , class data_type, int(*)(const key_type &, const data_type &) default_comparison_function>

void DataStructures::OrderedList< key_type, data_type, default_comparison_function >::InsertAtEnd | ( | const data_type & | data,
|  | const char * | file,
|  | unsigned int | line
| ) |  |

Definition at line 250 of file DS_OrderedList.h.

template<class key_type , class data_type, int(*)(const key_type &, const data_type &) default_comparison_function>

void DataStructures::OrderedList< key_type, data_type, default_comparison_function >::InsertAtIndex | ( | const data_type & | data,
|  | const unsigned | index,
|  | const char * | file,
|  | unsigned int | line
| ) |  |

Definition at line 244 of file DS_OrderedList.h.

template<class key_type , class data_type , int(*)(const key_type &, const data_type &) default_comparison_function>

OrderedList< key_type, data_type, default_comparison_function > & DataStructures::OrderedList< key_type, data_type, default_comparison_function >::operator= | ( | const OrderedList< key_type, data_type, default_comparison_function > & | original_copy | ) |

Definition at line 90 of file DS_OrderedList.h.

References DataStructures::OrderedList< key_type, data_type, default_comparison_function >::orderedList.

template<class key_type , class data_type , int(*)(const key_type &, const data_type &) default_comparison_function>

data_type & DataStructures::OrderedList< key_type, data_type, default_comparison_function >::operator[] | ( | const unsigned int | position | ) | const

Definition at line 268 of file DS_OrderedList.h.

template<class key_type, class data_type, int(*)(const key_type &, const data_type &) default_comparison_function>

unsigned DataStructures::OrderedList< key_type, data_type, default_comparison_function >::Remove | ( | const key_type & | key,
|  | int(*)(const key_type &, const data_type &) | cf = `default_comparison_function`
| ) |  |

Definition at line 204 of file DS_OrderedList.h.

References RakAssert.

template<class key_type , class data_type , int(*)(const key_type &, const data_type &) default_comparison_function>

void DataStructures::OrderedList< key_type, data_type, default_comparison_function >::RemoveAtIndex | ( | const unsigned | index | ) |

Definition at line 238 of file DS_OrderedList.h.

Referenced by SLNet::VariableDeltaSerializer::DirtyAndFreeVarsAssociatedWithReceipt(), and SLNet::VariableDeltaSerializer::FreeVarsAssociatedWithReceipt().

template<class key_type , class data_type , int(*)(const key_type &, const data_type &) default_comparison_function>

void DataStructures::OrderedList< key_type, data_type, default_comparison_function >::RemoveFromEnd | ( | const unsigned | num = `1` | ) |

Definition at line 256 of file DS_OrderedList.h.

template<class key_type, class data_type, int(*)(const key_type &, const data_type &) default_comparison_function>

unsigned DataStructures::OrderedList< key_type, data_type, default_comparison_function >::RemoveIfExists | ( | const key_type & | key,
|  | int(*)(const key_type &, const data_type &) | cf = `default_comparison_function`
| ) |  |

Definition at line 223 of file DS_OrderedList.h.

template<class key_type , class data_type , int(*)(const key_type &, const data_type &) default_comparison_function>

unsigned DataStructures::OrderedList< key_type, data_type, default_comparison_function >::Size | ( | void |  | ) | const

Definition at line 274 of file DS_OrderedList.h.

Referenced by SLNet::StringTable::AddString(), SLNet::StringTable::DecodeString(), SLNet::ReliabilityLayer::HandleSocketReceiveFromConnectedPlayer(), SLNet::CommandParserInterface::SendCommandList(), DataStructures::Table::SortTable(), and SLNet::StringTable::~StringTable().

## Member Data Documentation

template<class key_type, class data_type, int(*)(const key_type &, const data_type &) default_comparison_function = defaultOrderedListComparison<key_type, data_type>>

DataStructures::List<data_type> DataStructures::OrderedList< key_type, data_type, default_comparison_function >::orderedList

protected

Definition at line 69 of file DS_OrderedList.h.

Referenced by DataStructures::OrderedList< key_type, data_type, default_comparison_function >::operator=(), and DataStructures::OrderedList< key_type, data_type, default_comparison_function >::OrderedList().

The documentation for this class was generated from the following file:

- Source/include/slikenet/DS_OrderedList.h