# DataStructures Namespace Reference

## Classes
class | BinarySearchTree
| A binary search tree and an AVL balanced binary search tree. More...
class | AVLBalancedBinarySearchTree
| An AVLBalancedBinarySearchTree is a binary tree that is always balanced. More...
struct | Page
class | BPlusTree
class | CircularLinkedList
| (Circular) Linked List ADT (Doubly Linked Pointer to Node Style) - More...
class | List
| Array based implementation of a list. More...
class | Map
class | MemoryPool
class | MLKeyRef
class | Multilist
class | OrderedList
class | Queue
| A queue implemented as an array with a read and write index. More...
class | QueueLinkedList
| A queue implemented using a linked list. Rarely used. More...
class | Table
| Holds a set of columns, a set of rows, and rows times columns cells. The table data structure is useful if you want to store a set of structures and perform queries on those structures This is a relatively simple and fast implementation of the types of tables commonly used in databases See TableSerializer to serialize data members of the table See LightweightDatabaseClient and LightweightDatabaseServer to transmit the table over the network. More...
class | SingleProducerConsumer
| A single producer consumer implementation without critical sections. More...
## Enumerations
enum | MultilistType { ML_UNORDERED_LIST, ML_STACK, ML_QUEUE, ML_ORDERED_LIST, ML_VARIABLE_DURING_RUNTIME }
| What algorithm to use to store the data for the Multilist. More...
## Functions
template<class key_type >
int | defaultMapKeyComparison (const key_type &a, const key_type &b)
template<class templateType >
void | DeletePtr_RakNet (templateType &ptr, const char *file, unsigned int line)
template<class templateType >
void | DeletePtr (templateType &ptr)

## Detailed Description

The namespace DataStructures was only added to avoid compiler errors for commonly named data structures As these data structures are stand-alone, you can use them outside of RakNet for your own projects if you wish.

## Enumeration Type Documentation

enum DataStructures::MultilistType

What algorithm to use to store the data for the Multilist.

Enumerator:

  ML_UNORDERED_LIST | Removing from the middle of the list will swap the end of the list rather than shift the elements. Push and Pop operate on the tail.
  ML_STACK | A normal list, with the list order preserved. Push and Pop operate on the tail.
  ML_QUEUE | A queue. Push and Pop operate on the head.
  ML_ORDERED_LIST | A list that is always kept in order. Elements must be unique, and compare against each other consistently using <, ==, and >.
  ML_VARIABLE_DURING_RUNTIME | A list whose type can change at runtime.

## Function Documentation

template<class key_type >

int DataStructures::defaultMapKeyComparison | ( | const key_type & | a,
|  | const key_type & | b |
| ) |  |  | `[inline]`

The default comparison has to be first so it can be called as a default parameter. It then is followed by MapNode, followed by NodeComparisonFunc

template<class templateType >

void DataStructures::DeletePtr | ( | templateType & | ptr | ) | `[inline]`

Can be used with Multilist::ForEach Assuming the Multilist holds pointers, will delete those pointers

template<class templateType >

void DataStructures::DeletePtr_RakNet | ( | templateType & | ptr,
|  | const char * | file,
|  | unsigned int | line |
| ) |  |  | `[inline]`

Can be used with Multilist::ForEach Assuming the Multilist holds pointers, will delete those pointers