A simple first in first out queue. More...

Classes | |
| struct | Element |
| A single data chunk in the queue. More... | |
Public Member Functions | |
| Queue () | |
| Initialize to defaults. | |
| ~Queue () | |
| Dispose of all data remaining in the Queue. | |
| void | clear (void) |
| Dispose of all data in the Queue. | |
| const T & | back (void) const |
| Get a reference to the last element in the list. | |
| T & | back (void) |
| Get a reference to the last element in the list. | |
| const T & | front (void) const |
| Get a reference to the first element in the list. | |
| T & | front (void) |
| Get a reference to the first element in the list. | |
| void | pop (void) |
| Remove the first element in the list. | |
| void | push (const T &rData) |
| Insert data at the end of the list. | |
| uintptr_t | size (void) const |
| Get the number of entries in the queue. | |
| uint_t | empty (void) const |
| Returns TRUE if the queue is empty. | |
Private Attributes | |
| Element * | m_pFirstElement |
| Pointer to the first element in the linked list. | |
| Element * | m_pLastElement |
| Pointer to the last element in the linked list. | |
| uintptr_t | m_uCount |
| Number of entries in the linked list. | |
A simple first in first out queue.
This class will put data into a singly linked list and insert at the end and extract from the beginning.
|
inline |
|
inline |
|
inline |
Get a reference to the last element in the list.
This will return a reference to the last entry in the list.
|
inline |
Get a reference to the last element in the list.
This will return a reference to the last entry in the list.
|
inline |
Dispose of all data in the Queue.
Frees all data and clears out the queue. The queue is still valid, only empty.
|
inline |
Returns TRUE if the queue is empty.
|
inline |
Get a reference to the first element in the list.
This will return a reference to the first entry in the list.
|
inline |
Get a reference to the first element in the list.
This will return a reference to the first entry in the list.
|
inline |
Remove the first element in the list.
This will dispose of the first entry in the list.
|
inline |
Insert data at the end of the list.
Allocate memory for a new entry and place it at the end of linked list.
| rData | Reference to a data chunk to copy into the queue |
|
inline |
Get the number of entries in the queue.
|
private |
Pointer to the first element in the linked list.
|
private |
Pointer to the last element in the linked list.
|
private |
Number of entries in the linked list.