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
Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
DataStructures::Map< key_type, data_type, key_comparison_func > Class Template Reference

`#include <slikenet/DS_Map.h>`

Inheritance diagram for DataStructures::Map< key_type, data_type, key_comparison_func >:

## Classes

struct | MapNode

## Public Member Functions

| Map ()
| ~Map ()
| Map (const Map &original_copy)
Map & | operator= (const Map &original_copy)
data_type & | Get (const key_type &key) const
data_type | Pop (const key_type &key)
void | Set (const key_type &key, const data_type &data)
void | SetExisting (const key_type &key, const data_type &data)
void | SetNew (const key_type &key, const data_type &data)
bool | Has (const key_type &key) const
bool | Delete (const key_type &key)
data_type & | operator[] (const unsigned int position) const
key_type | GetKeyAtIndex (const unsigned int position) const
unsigned | GetIndexAtKey (const key_type &key)
void | RemoveAtIndex (const unsigned index)
void | Clear (void)
unsigned | Size (void) const

## Static Public Member Functions

static void | IMPLEMENT_DEFAULT_COMPARISON (void)
static int | NodeComparisonFunc (const key_type &a, const MapNode &b)

## Protected Member Functions

void | SaveLastSearch (const key_type &key, unsigned index) const
bool | HasSavedSearchResult (const key_type &key) const

## Protected Attributes

DataStructures::OrderedList < key_type, MapNode,&Map::NodeComparisonFunc > | mapNodeList
unsigned | lastSearchIndex
key_type | lastSearchKey
bool | lastSearchIndexValid

## Detailed Description

### template<class key_type, class data_type, int(*)(const key_type &, const key_type &) key_comparison_func = defaultMapKeyComparison<key_type>>
class DataStructures::Map< key_type, data_type, key_comparison_func >

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

Definition at line 47 of file DS_Map.h.

## Constructor & Destructor Documentation

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

DataStructures::Map< key_type, data_type, key_comparison_func >::Map | ( |  | ) |

Definition at line 102 of file DS_Map.h.

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

DataStructures::Map< key_type, data_type, key_comparison_func >::~Map | ( |  | ) |

Definition at line 108 of file DS_Map.h.

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

DataStructures::Map< key_type, data_type, key_comparison_func >::Map | ( | const Map< key_type, data_type, key_comparison_func > & | original_copy | ) |

Definition at line 114 of file DS_Map.h.

References DataStructures::Map< key_type, data_type, key_comparison_func >::lastSearchIndex, DataStructures::Map< key_type, data_type, key_comparison_func >::lastSearchIndexValid, DataStructures::Map< key_type, data_type, key_comparison_func >::lastSearchKey, and DataStructures::Map< key_type, data_type, key_comparison_func >::mapNodeList.

## Member Function Documentation

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

void DataStructures::Map< key_type, data_type, key_comparison_func >::Clear | ( | void |  | ) |

Definition at line 282 of file DS_Map.h.

References _FILE_AND_LINE_.

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

bool DataStructures::Map< key_type, data_type, key_comparison_func >::Delete | ( | const key_type & | key | ) |

Definition at line 259 of file DS_Map.h.

Referenced by DataStructures::WeightedGraph< node_type, weight_type, allow_unlinkedNodes >::GenerateDisjktraMatrix().

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

data_type & DataStructures::Map< key_type, data_type, key_comparison_func >::Get | ( | const key_type & | key | ) | const

Definition at line 133 of file DS_Map.h.

References RakAssert.

Referenced by SLNet::StringCompressor::DecodeString(), SLNet::StringCompressor::EncodeString(), DataStructures::WeightedGraph< node_type, weight_type, allow_unlinkedNodes >::GenerateDisjktraMatrix(), SLNet::StringCompressor::GenerateTreeFromStrings(), and DataStructures::WeightedGraph< node_type, weight_type, allow_unlinkedNodes >::GetSpanningTree().

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

unsigned DataStructures::Map< key_type, data_type, key_comparison_func >::GetIndexAtKey | ( | const key_type & | key | ) |

Definition at line 147 of file DS_Map.h.

References RakAssert.

Referenced by DataStructures::WeightedGraph< node_type, weight_type, allow_unlinkedNodes >::GenerateDisjktraMatrix().

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

key_type DataStructures::Map< key_type, data_type, key_comparison_func >::GetKeyAtIndex | ( | const unsigned int | position | ) | const

Definition at line 295 of file DS_Map.h.

Referenced by DataStructures::WeightedGraph< node_type, weight_type, allow_unlinkedNodes >::GenerateDisjktraMatrix(), and DataStructures::WeightedGraph< node_type, weight_type, allow_unlinkedNodes >::GetSpanningTree().

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

bool DataStructures::Map< key_type, data_type, key_comparison_func >::Has | ( | const key_type & | key | ) | const

Definition at line 245 of file DS_Map.h.

Referenced by SLNet::StringCompressor::DecodeString(), SLNet::StringCompressor::EncodeString(), SLNet::StringCompressor::GenerateTreeFromStrings(), and DataStructures::WeightedGraph< node_type, weight_type, allow_unlinkedNodes >::GetSpanningTree().

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

bool DataStructures::Map< key_type, data_type, key_comparison_func >::HasSavedSearchResult | ( | const key_type & | key | ) | const

protected

Definition at line 320 of file DS_Map.h.

template<class key_type, class data_type, int(*)(const key_type &, const key_type &) key_comparison_func = defaultMapKeyComparison<key_type>>

static void DataStructures::Map< key_type, data_type, key_comparison_func >::IMPLEMENT_DEFAULT_COMPARISON | ( | void |  | ) |

inlinestatic

Definition at line 50 of file DS_Map.h.

Referenced by SLNet::StringCompressor::StringCompressor().

template<class key_type, class data_type, int(*)(const key_type &, const key_type &) key_comparison_func = defaultMapKeyComparison<key_type>>

static int DataStructures::Map< key_type, data_type, key_comparison_func >::NodeComparisonFunc | ( | const key_type & | a,
|  | const MapNode & | b
| ) |  |

inlinestatic

Definition at line 63 of file DS_Map.h.

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

Map< key_type, data_type, key_comparison_func > & DataStructures::Map< key_type, data_type, key_comparison_func >::operator= | ( | const Map< key_type, data_type, key_comparison_func > & | original_copy | ) |

Definition at line 123 of file DS_Map.h.

References DataStructures::Map< key_type, data_type, key_comparison_func >::lastSearchIndex, DataStructures::Map< key_type, data_type, key_comparison_func >::lastSearchIndexValid, DataStructures::Map< key_type, data_type, key_comparison_func >::lastSearchKey, and DataStructures::Map< key_type, data_type, key_comparison_func >::mapNodeList.

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

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

Definition at line 289 of file DS_Map.h.

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

data_type DataStructures::Map< key_type, data_type, key_comparison_func >::Pop | ( | const key_type & | key | ) |

Definition at line 171 of file DS_Map.h.

References RakAssert.

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

void DataStructures::Map< key_type, data_type, key_comparison_func >::RemoveAtIndex | ( | const unsigned | index | ) |

Definition at line 164 of file DS_Map.h.

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

void DataStructures::Map< key_type, data_type, key_comparison_func >::SaveLastSearch | ( | const key_type & | key,
|  | unsigned | index
| ) |  | const

protected

Definition at line 307 of file DS_Map.h.

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

void DataStructures::Map< key_type, data_type, key_comparison_func >::Set | ( | const key_type & | key,
|  | const data_type & | data
| ) |  |

Definition at line 189 of file DS_Map.h.

References _FILE_AND_LINE_.

Referenced by DataStructures::WeightedGraph< node_type, weight_type, allow_unlinkedNodes >::GenerateDisjktraMatrix(), SLNet::StringCompressor::GenerateTreeFromStrings(), and SLNet::StringCompressor::StringCompressor().

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

void DataStructures::Map< key_type, data_type, key_comparison_func >::SetExisting | ( | const key_type & | key,
|  | const data_type & | data
| ) |  |

Definition at line 214 of file DS_Map.h.

References RakAssert.

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

void DataStructures::Map< key_type, data_type, key_comparison_func >::SetNew | ( | const key_type & | key,
|  | const data_type & | data
| ) |  |

Definition at line 234 of file DS_Map.h.

References _FILE_AND_LINE_, and RakAssert.

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

unsigned DataStructures::Map< key_type, data_type, key_comparison_func >::Size | ( | void |  | ) | const

Definition at line 301 of file DS_Map.h.

Referenced by DataStructures::WeightedGraph< node_type, weight_type, allow_unlinkedNodes >::GenerateDisjktraMatrix(), DataStructures::WeightedGraph< node_type, weight_type, allow_unlinkedNodes >::GetSpanningTree(), and SLNet::StringCompressor::~StringCompressor().

## Member Data Documentation

template<class key_type, class data_type, int(*)(const key_type &, const key_type &) key_comparison_func = defaultMapKeyComparison<key_type>>

unsigned DataStructures::Map< key_type, data_type, key_comparison_func >::lastSearchIndex

protected

Definition at line 96 of file DS_Map.h.

Referenced by DataStructures::Map< key_type, data_type, key_comparison_func >::Map(), and DataStructures::Map< key_type, data_type, key_comparison_func >::operator=().

template<class key_type, class data_type, int(*)(const key_type &, const key_type &) key_comparison_func = defaultMapKeyComparison<key_type>>

bool DataStructures::Map< key_type, data_type, key_comparison_func >::lastSearchIndexValid

protected

Definition at line 98 of file DS_Map.h.

Referenced by DataStructures::Map< key_type, data_type, key_comparison_func >::Map(), and DataStructures::Map< key_type, data_type, key_comparison_func >::operator=().

template<class key_type, class data_type, int(*)(const key_type &, const key_type &) key_comparison_func = defaultMapKeyComparison<key_type>>

key_type DataStructures::Map< key_type, data_type, key_comparison_func >::lastSearchKey

protected

Definition at line 97 of file DS_Map.h.

Referenced by DataStructures::Map< key_type, data_type, key_comparison_func >::Map(), and DataStructures::Map< key_type, data_type, key_comparison_func >::operator=().

template<class key_type, class data_type, int(*)(const key_type &, const key_type &) key_comparison_func = defaultMapKeyComparison<key_type>>

DataStructures::OrderedList< key_type,MapNode,&Map::NodeComparisonFunc > DataStructures::Map< key_type, data_type, key_comparison_func >::mapNodeList

protected

Definition at line 91 of file DS_Map.h.

Referenced by DataStructures::Map< key_type, data_type, key_comparison_func >::Map(), and DataStructures::Map< key_type, data_type, key_comparison_func >::operator=().

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

- Source/include/slikenet/DS_Map.h