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 | List of all members
DataStructures::Queue< queue_type > Class Template Reference

A queue implemented as an array with a read and write index. More...

`#include <slikenet/DS_Queue.h>`

Inheritance diagram for DataStructures::Queue< queue_type >:

## Public Member Functions

| Queue ()
| ~Queue ()
| Queue (const Queue &original_copy)
bool | operator= (const Queue &original_copy)
void | Push (const queue_type &input, const char *file, unsigned int line)
void | PushAtHead (const queue_type &input, unsigned index, const char *file, unsigned int line)
queue_type & | operator[] (unsigned int position) const
void | RemoveAtIndex (unsigned int position)
queue_type | Peek (void) const
queue_type | PeekTail (void) const
queue_type | Pop (void)
queue_type | PopTail (void)
queue_type | PopDeref (void)
unsigned int | Size (void) const
bool | IsEmpty (void) const
unsigned int | AllocationSize (void) const
void | Clear (const char *file, unsigned int line)
void | Compress (const char *file, unsigned int line)
bool | Find (const queue_type &q)
void | ClearAndForceAllocation (int size, const char *file, unsigned int line)

## Detailed Description

### template<class queue_type>
class DataStructures::Queue< queue_type >

A queue implemented as an array with a read and write index.

Definition at line 36 of file DS_Queue.h.

## Constructor & Destructor Documentation

template<class queue_type >

DataStructures::Queue< queue_type >::Queue | ( |  | ) |

Definition at line 91 of file DS_Queue.h.

template<class queue_type >

DataStructures::Queue< queue_type >::~Queue | ( |  | ) |

Definition at line 102 of file DS_Queue.h.

References _FILE_AND_LINE_, and SLNet::OP_DELETE_ARRAY().

template<class queue_type >

DataStructures::Queue< queue_type >::Queue | ( | const Queue< queue_type > & | original_copy | ) |

Definition at line 276 of file DS_Queue.h.

References _FILE_AND_LINE_, and DataStructures::Queue< queue_type >::Size().

## Member Function Documentation

template<class queue_type >

unsigned int DataStructures::Queue< queue_type >::AllocationSize | ( | void |  | ) | const

inline

Definition at line 85 of file DS_Queue.h.

template<class queue_type >

void DataStructures::Queue< queue_type >::Clear | ( | const char * | file,
|  | unsigned int | line
| ) |  |

inline

Definition at line 332 of file DS_Queue.h.

References SLNet::OP_DELETE_ARRAY(), and return.

Referenced by SLNet::BPSTracker::Reset(), and SLNet::RakPeer::Shutdown().

template<class queue_type >

void DataStructures::Queue< queue_type >::ClearAndForceAllocation | ( | int | size,
|  | const char * | file,
|  | unsigned int | line
| ) |  |

Definition at line 393 of file DS_Queue.h.

References SLNet::OP_DELETE_ARRAY().

template<class queue_type >

void DataStructures::Queue< queue_type >::Compress | ( | const char * | file,
|  | unsigned int | line
| ) |  |

Definition at line 348 of file DS_Queue.h.

References SLNet::OP_DELETE_ARRAY().

template<class queue_type>

bool DataStructures::Queue< queue_type >::Find | ( | const queue_type & | q | ) |

Definition at line 374 of file DS_Queue.h.

template<class queue_type >

bool DataStructures::Queue< queue_type >::IsEmpty | ( | void |  | ) | const

inline

Definition at line 79 of file DS_Queue.h.

Referenced by SLNet::BPSTracker::ClearExpired1(), DataStructures::WeightedGraph< node_type, weight_type, allow_unlinkedNodes >::GetShortestPath(), SLNet::RakPeer::Receive(), and SLNet::RakPeer::RunUpdateCycle().

template<class queue_type >

bool DataStructures::Queue< queue_type >::operator= | ( | const Queue< queue_type > & | original_copy | ) |

Definition at line 301 of file DS_Queue.h.

References _FILE_AND_LINE_, and DataStructures::Queue< queue_type >::Size().

template<class queue_type >

queue_type & DataStructures::Queue< queue_type >::operator[] | ( | unsigned int | position | ) | const

inline

Definition at line 406 of file DS_Queue.h.

References RakAssert.

template<class queue_type >

queue_type DataStructures::Queue< queue_type >::Peek | ( | void |  | ) | const

inline

Definition at line 206 of file DS_Queue.h.

References RakAssert.

Referenced by SLNet::BPSTracker::ClearExpired1().

template<class queue_type >

queue_type DataStructures::Queue< queue_type >::PeekTail | ( | void |  | ) | const

inline

Definition at line 216 of file DS_Queue.h.

References RakAssert.

template<class queue_type >

queue_type DataStructures::Queue< queue_type >::Pop | ( | void |  | ) |

inline

Definition at line 109 of file DS_Queue.h.

References RakAssert.

Referenced by SLNet::RakPeer::AllocRNS2RecvStruct(), SLNet::RakPeer::ClearBufferedPackets(), SLNet::BPSTracker::ClearExpired1(), SLNet::RakPeer::ClearRequestedConnectionList(), SLNet::HuffmanEncodingTree::FreeMemory(), DataStructures::BPlusTree< KeyType, DataType, order >::FreePages(), DataStructures::WeightedGraph< node_type, weight_type, allow_unlinkedNodes >::GetShortestPath(), DataStructures::WeightedGraph< node_type, weight_type, allow_unlinkedNodes >::GetSpanningTree(), DataStructures::Tree< TreeType >::LevelOrderTraversal(), SLNet::RakPeer::PopBufferedPacket(), DataStructures::BPlusTree< KeyType, DataType, order >::PrintGraph(), SLNet::RakNetRandomSync::RandomMT(), SLNet::RakPeer::Receive(), and DataStructures::WeightedGraph< node_type, weight_type, allow_unlinkedNodes >::RemoveNode().

template<class queue_type >

queue_type DataStructures::Queue< queue_type >::PopDeref | ( | void |  | ) |

inline

Definition at line 144 of file DS_Queue.h.

template<class queue_type >

queue_type DataStructures::Queue< queue_type >::PopTail | ( | void |  | ) |

inline

Definition at line 126 of file DS_Queue.h.

References RakAssert.

template<class queue_type>

void DataStructures::Queue< queue_type >::Push | ( | const queue_type & | input,
|  | const char * | file,
|  | unsigned int | line
| ) |  |

Definition at line 228 of file DS_Queue.h.

References SLNet::OP_DELETE_ARRAY(), RakAssert, and return.

Referenced by SLNet::RakPeer::AddPacketToProducer(), SLNet::RakPeer::ClearRequestedConnectionList(), SLNet::RakPeer::DeallocRNS2RecvStruct(), SLNet::HuffmanEncodingTree::FreeMemory(), DataStructures::BPlusTree< KeyType, DataType, order >::FreePages(), DataStructures::WeightedGraph< node_type, weight_type, allow_unlinkedNodes >::GetSpanningTree(), DataStructures::Tree< TreeType >::LevelOrderTraversal(), DataStructures::BPlusTree< KeyType, DataType, order >::PrintGraph(), SLNet::BPSTracker::Push1(), DataStructures::OrderedChannelHeap< channel_key_type, heap_data_type, channel_key_comparison_func >::PushAtHead(), SLNet::RakPeer::PushBackPacket(), SLNet::RakPeer::PushBufferedPacket(), SLNet::RakNetRandomSync::RandomMT(), DataStructures::WeightedGraph< node_type, weight_type, allow_unlinkedNodes >::RemoveNode(), and SLNet::RakPeer::SendConnectionRequest().

template<class queue_type>

void DataStructures::Queue< queue_type >::PushAtHead | ( | const queue_type & | input,
|  | unsigned | index,
|  | const char * | file,
|  | unsigned int | line
| ) |  |

Definition at line 163 of file DS_Queue.h.

References RakAssert.

Referenced by DataStructures::WeightedGraph< node_type, weight_type, allow_unlinkedNodes >::GetShortestPath(), DataStructures::OrderedChannelHeap< channel_key_type, heap_data_type, channel_key_comparison_func >::PushAtHead(), and SLNet::RakPeer::PushBackPacket().

template<class queue_type >

void DataStructures::Queue< queue_type >::RemoveAtIndex | ( | unsigned int | position | ) |

Definition at line 420 of file DS_Queue.h.

References RakAssert, and return.

Referenced by SLNet::RakPeer::CancelConnectionAttempt(), DataStructures::OrderedChannelHeap< channel_key_type, heap_data_type, channel_key_comparison_func >::Pop(), SLNet::ProcessOfflineNetworkPacket(), and SLNet::RakPeer::RunUpdateCycle().

template<class queue_type >

unsigned int DataStructures::Queue< queue_type >::Size | ( | void |  | ) | const

inline

Definition at line 70 of file DS_Queue.h.

Referenced by SLNet::RakPeer::AllocRNS2RecvStruct(), SLNet::RakPeer::CancelConnectionAttempt(), DataStructures::OrderedChannelHeap< channel_key_type, heap_data_type, channel_key_comparison_func >::ChannelSize(), SLNet::RakPeer::ClearBufferedPackets(), SLNet::RakPeer::ClearRequestedConnectionList(), SLNet::HuffmanEncodingTree::FreeMemory(), DataStructures::BPlusTree< KeyType, DataType, order >::FreePages(), SLNet::RakPeer::GetConnectionState(), SLNet::RakPeer::GetReceiveBufferSize(), DataStructures::WeightedGraph< node_type, weight_type, allow_unlinkedNodes >::GetShortestPath(), DataStructures::WeightedGraph< node_type, weight_type, allow_unlinkedNodes >::GetSpanningTree(), DataStructures::Tree< TreeType >::LevelOrderTraversal(), DataStructures::Queue< queue_type >::operator=(), SLNet::RakPeer::PopBufferedPacket(), DataStructures::BPlusTree< KeyType, DataType, order >::PrintGraph(), SLNet::ProcessOfflineNetworkPacket(), DataStructures::OrderedChannelHeap< channel_key_type, heap_data_type, channel_key_comparison_func >::PushAtHead(), DataStructures::Queue< queue_type >::Queue(), SLNet::RakNetRandomSync::RandomMT(), DataStructures::WeightedGraph< node_type, weight_type, allow_unlinkedNodes >::RemoveNode(), SLNet::RakPeer::RunUpdateCycle(), SLNet::RakPeer::SendConnectionRequest(), and SLNet::RakPeer::Shutdown().

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

- Source/include/slikenet/DS_Queue.h