# DS_Multilist.h File Reference

[Internal] ADT that can represent an unordered list, ordered list, stack, or queue with a common interface More...

`#include "RakAssert.h"`
`#include <string.h>`
`#include "Export.h"`
`#include "RakMemoryOverride.h"`
`#include "NativeTypes.h"`

## Classes
class | DataStructures::MLKeyRef< templateType >
class | DataStructures::Multilist< _MultilistType, _DataType, _KeyType, _IndexType >
## Namespaces
namespace | DataStructures
## Defines
#define | DEFINE_MULTILIST_PTR_TO_MEMBER_COMPARISONS(_CLASS_NAME_, _KEY_TYPE_, _MEMBER_VARIABLE_NAME_)
## Enumerations
enum | DataStructures::MultilistType { DataStructures::ML_UNORDERED_LIST, DataStructures::ML_STACK, DataStructures::ML_QUEUE, DataStructures::ML_ORDERED_LIST, DataStructures::ML_VARIABLE_DURING_RUNTIME }
| What algorithm to use to store the data for the Multilist. More...
## Functions
template<class templateType >
void | DataStructures::DeletePtr_RakNet (templateType &ptr, const char *file, unsigned int line)
template<class templateType >
void | DataStructures::DeletePtr (templateType &ptr)

## Detailed Description

[Internal] ADT that can represent an unordered list, ordered list, stack, or queue with a common interface

This file is part of RakNet Copyright 2003 Kevin Jenkins.

Usage of RakNet is subject to the appropriate license agreement. Creative Commons Licensees are subject to the license found at http://creativecommons.org/licenses/by-nc/2.5/ Single application licensees are subject to the license found at http://www.jenkinssoftware.com/SingleApplicationLicense.html Custom license users are subject to the terms therein. GPL license users are subject to the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

## Define Documentation

#define DEFINE_MULTILIST_PTR_TO_MEMBER_COMPARISONS | ( | _CLASS_NAME_,
|  | _KEY_TYPE_,
|  | _MEMBER_VARIABLE_NAME_ |  | ) |

Value:

    bool operator<( const DataStructures::MLKeyRef<_KEY_TYPE_> &inputKey, const _CLASS_NAME_ *cls ) {return inputKey.Get() < cls->_MEMBER_VARIABLE_NAME_;} \
            bool operator>( const DataStructures::MLKeyRef<_KEY_TYPE_> &inputKey, const _CLASS_NAME_ *cls ) {return inputKey.Get() > cls->_MEMBER_VARIABLE_NAME_;} \
            bool operator==( const DataStructures::MLKeyRef<_KEY_TYPE_> &inputKey, const _CLASS_NAME_ *cls ) {return inputKey.Get() == cls->_MEMBER_VARIABLE_NAME_;}

For the Multilist, when _DataType != _KeyType, you must define the comparison operators between the key and the data This is non-trivial due to the need to use MLKeyRef in case the type held is a pointer to a structure or class and the key type is not a class For convenience, this macro will implement the comparison operators under the following conditions 1. _DataType is a pointer to a class or structure 2. The key is a member variable of _DataType