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::OrderedChannelHeap< channel_key_type, heap_data_type, channel_key_comparison_func > Class Template Reference

`#include <slikenet/DS_OrderedChannelHeap.h>`

## Classes

struct | HeapChannelAndData
struct | QueueAndWeight

## Public Member Functions

| OrderedChannelHeap ()
| ~OrderedChannelHeap ()
void | Push (const channel_key_type &channelID, const heap_data_type &data)
void | PushAtHead (const unsigned index, const channel_key_type &channelID, const heap_data_type &data)
heap_data_type | Pop (const unsigned startingIndex=0)
heap_data_type | Peek (const unsigned startingIndex) const
void | AddChannel (const channel_key_type &channelID, const double weight)
void | RemoveChannel (channel_key_type channelID)
void | Clear (void)
heap_data_type & | operator[] (const unsigned int position) const
unsigned | ChannelSize (const channel_key_type &channelID)
unsigned | Size (void) const

## Static Public Member Functions

static void | IMPLEMENT_DEFAULT_COMPARISON (void)

## Protected Member Functions

void | GreatestRandResult (void)

## Protected Attributes

DataStructures::Map < channel_key_type, QueueAndWeight *, channel_key_comparison_func > | map
DataStructures::Heap< double, HeapChannelAndData, true > | heap

## Detailed Description

### template<class channel_key_type, class heap_data_type, int(*)(const channel_key_type &, const channel_key_type &) channel_key_comparison_func = defaultMapKeyComparison<channel_key_type>>
class DataStructures::OrderedChannelHeap< channel_key_type, heap_data_type, channel_key_comparison_func >

Definition at line 37 of file DS_OrderedChannelHeap.h.

## Class Documentation

struct DataStructures::OrderedChannelHeap::QueueAndWeight

### template<class channel_key_type, class heap_data_type, int(*)(const channel_key_type &, const channel_key_type &) channel_key_comparison_func = defaultMapKeyComparison<channel_key_type>>
struct DataStructures::OrderedChannelHeap< channel_key_type, heap_data_type, channel_key_comparison_func >::QueueAndWeight

Definition at line 55 of file DS_OrderedChannelHeap.h.

Class Members
Queue< double > | randResultQueue |
bool | signalDeletion |
double | weight |

## Constructor & Destructor Documentation

template<class channel_key_type , class heap_data_type , int(*)(const channel_key_type &, const channel_key_type &) channel_key_comparison_func>

DataStructures::OrderedChannelHeap< channel_key_type, heap_data_type, channel_key_comparison_func >::OrderedChannelHeap | ( |  | ) |

Definition at line 77 of file DS_OrderedChannelHeap.h.

template<class channel_key_type , class heap_data_type , int(*)(const channel_key_type &, const channel_key_type &) channel_key_comparison_func>

DataStructures::OrderedChannelHeap< channel_key_type, heap_data_type, channel_key_comparison_func >::~OrderedChannelHeap | ( |  | ) |

Definition at line 82 of file DS_OrderedChannelHeap.h.

## Member Function Documentation

template<class channel_key_type , class heap_data_type , int(*)(const channel_key_type &, const channel_key_type &) channel_key_comparison_func>

void DataStructures::OrderedChannelHeap< channel_key_type, heap_data_type, channel_key_comparison_func >::AddChannel | ( | const channel_key_type & | channelID,
|  | const double | weight
| ) |  |

Definition at line 197 of file DS_OrderedChannelHeap.h.

References _FILE_AND_LINE_, DataStructures::OrderedChannelHeap< channel_key_type, heap_data_type, channel_key_comparison_func >::QueueAndWeight::signalDeletion, and DataStructures::OrderedChannelHeap< channel_key_type, heap_data_type, channel_key_comparison_func >::QueueAndWeight::weight.

template<class channel_key_type , class heap_data_type , int(*)(const channel_key_type &, const channel_key_type &) channel_key_comparison_func>

unsigned DataStructures::OrderedChannelHeap< channel_key_type, heap_data_type, channel_key_comparison_func >::ChannelSize | ( | const channel_key_type & | channelID | ) |

Definition at line 239 of file DS_OrderedChannelHeap.h.

References DataStructures::OrderedChannelHeap< channel_key_type, heap_data_type, channel_key_comparison_func >::QueueAndWeight::randResultQueue, and DataStructures::Queue< queue_type >::Size().

template<class channel_key_type , class heap_data_type , int(*)(const channel_key_type &, const channel_key_type &) channel_key_comparison_func>

void DataStructures::OrderedChannelHeap< channel_key_type, heap_data_type, channel_key_comparison_func >::Clear | ( | void |  | ) |

Definition at line 246 of file DS_OrderedChannelHeap.h.

References _FILE_AND_LINE_, and SLNet::OP_DELETE().

template<class channel_key_type , class heap_data_type , int(*)(const channel_key_type &, const channel_key_type &) channel_key_comparison_func>

void DataStructures::OrderedChannelHeap< channel_key_type, heap_data_type, channel_key_comparison_func >::GreatestRandResult | ( | void |  | ) |

protected

Definition at line 94 of file DS_OrderedChannelHeap.h.

template<class channel_key_type , class heap_data_type , int(*)(const channel_key_type &, const channel_key_type &) channel_key_comparison_func = defaultMapKeyComparison<channel_key_type>>

static void DataStructures::OrderedChannelHeap< channel_key_type, heap_data_type, channel_key_comparison_func >::IMPLEMENT_DEFAULT_COMPARISON | ( | void |  | ) |

inlinestatic

Definition at line 40 of file DS_OrderedChannelHeap.h.

template<class channel_key_type , class heap_data_type , int(*)(const channel_key_type &, const channel_key_type &) channel_key_comparison_func>

heap_data_type & DataStructures::OrderedChannelHeap< channel_key_type, heap_data_type, channel_key_comparison_func >::operator[] | ( | const unsigned int | position | ) | const

Definition at line 232 of file DS_OrderedChannelHeap.h.

template<class channel_key_type , class heap_data_type , int(*)(const channel_key_type &, const channel_key_type &) channel_key_comparison_func>

heap_data_type DataStructures::OrderedChannelHeap< channel_key_type, heap_data_type, channel_key_comparison_func >::Peek | ( | const unsigned | startingIndex | ) | const

Definition at line 190 of file DS_OrderedChannelHeap.h.

References DataStructures::OrderedChannelHeap< channel_key_type, heap_data_type, channel_key_comparison_func >::HeapChannelAndData::data.

template<class channel_key_type , class heap_data_type , int(*)(const channel_key_type &, const channel_key_type &) channel_key_comparison_func>

heap_data_type DataStructures::OrderedChannelHeap< channel_key_type, heap_data_type, channel_key_comparison_func >::Pop | ( | const unsigned | startingIndex = `0` | ) |

Definition at line 161 of file DS_OrderedChannelHeap.h.

References RakAssert, DataStructures::OrderedChannelHeap< channel_key_type, heap_data_type, channel_key_comparison_func >::QueueAndWeight::randResultQueue, and DataStructures::Queue< queue_type >::RemoveAtIndex().

template<class channel_key_type , class heap_data_type , int(*)(const channel_key_type &, const channel_key_type &) channel_key_comparison_func>

void DataStructures::OrderedChannelHeap< channel_key_type, heap_data_type, channel_key_comparison_func >::Push | ( | const channel_key_type & | channelID,
|  | const heap_data_type & | data
| ) |  |

Definition at line 88 of file DS_OrderedChannelHeap.h.

References MAX_UNSIGNED_LONG.

template<class channel_key_type , class heap_data_type , int(*)(const channel_key_type &, const channel_key_type &) channel_key_comparison_func>

void DataStructures::OrderedChannelHeap< channel_key_type, heap_data_type, channel_key_comparison_func >::PushAtHead | ( | const unsigned | index,
|  | const channel_key_type & | channelID,
|  | const heap_data_type & | data
| ) |  |

Definition at line 108 of file DS_OrderedChannelHeap.h.

References frandomMT(), DataStructures::Queue< queue_type >::Push(), DataStructures::Queue< queue_type >::PushAtHead(), RakAssert, DataStructures::OrderedChannelHeap< channel_key_type, heap_data_type, channel_key_comparison_func >::QueueAndWeight::randResultQueue, DataStructures::Queue< queue_type >::Size(), and DataStructures::OrderedChannelHeap< channel_key_type, heap_data_type, channel_key_comparison_func >::QueueAndWeight::weight.

template<class channel_key_type , class heap_data_type , int(*)(const channel_key_type &, const channel_key_type &) channel_key_comparison_func>

void DataStructures::OrderedChannelHeap< channel_key_type, heap_data_type, channel_key_comparison_func >::RemoveChannel | ( | channel_key_type | channelID | ) |

Definition at line 206 of file DS_OrderedChannelHeap.h.

References _FILE_AND_LINE_, and SLNet::OP_DELETE().

template<class channel_key_type , class heap_data_type , int(*)(const channel_key_type &, const channel_key_type &) channel_key_comparison_func>

unsigned DataStructures::OrderedChannelHeap< channel_key_type, heap_data_type, channel_key_comparison_func >::Size | ( | void |  | ) | const

Definition at line 226 of file DS_OrderedChannelHeap.h.

## Member Data Documentation

template<class channel_key_type , class heap_data_type , int(*)(const channel_key_type &, const channel_key_type &) channel_key_comparison_func = defaultMapKeyComparison<channel_key_type>>

DataStructures::Heap<double, HeapChannelAndData, true> DataStructures::OrderedChannelHeap< channel_key_type, heap_data_type, channel_key_comparison_func >::heap

protected

Definition at line 72 of file DS_OrderedChannelHeap.h.

template<class channel_key_type , class heap_data_type , int(*)(const channel_key_type &, const channel_key_type &) channel_key_comparison_func = defaultMapKeyComparison<channel_key_type>>

DataStructures::Map<channel_key_type, QueueAndWeight*, channel_key_comparison_func> DataStructures::OrderedChannelHeap< channel_key_type, heap_data_type, channel_key_comparison_func >::map

protected

Definition at line 71 of file DS_OrderedChannelHeap.h.

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

- Source/include/slikenet/DS_OrderedChannelHeap.h