CLI
2.9
|
Basic queue object. More...
#include <tk_stl.h>
Classes | |
class | Iterator |
Iterator object. More... | |
Public Member Functions | |
Queue (const unsigned int UI_MaxCount) | |
Main constructor. More... | |
Queue (const Queue< T > &TK_Queue) | |
Copy constructor. More... | |
virtual | ~Queue (void) |
Destructor. More... | |
const bool | IsEmpty (void) const |
Determines whether the queue is empty. More... | |
const unsigned int | GetCount (void) const |
Item count. More... | |
const bool | Reset (void) |
Resets the queue. More... | |
Iterator | GetIterator (void) const |
Iterator retrieval. More... | |
const bool | IsValid (const Iterator &it) const |
Checks the element at the given position is valid. More... | |
const bool | MovePrevious (Iterator &it) const |
Iterates backward the iterator. More... | |
const bool | MoveNext (Iterator &it) const |
Iterates forward the iterator. More... | |
const T & | GetAt (const Iterator &it) const |
Read-only item retrieval. More... | |
T & | GetAt (const Iterator &it) |
Modifiable item retrieval. More... | |
const T | Remove (Iterator &it) |
Item removal. More... | |
const bool | AddHead (const T &T_Element) |
Add a new element at the head of the queue. More... | |
const bool | AddTail (const T &T_Element) |
Add a new element at the tail of the queue. More... | |
const T & | GetHead (void) const |
First item accessor of the read-only queue. More... | |
T & | GetHead (void) |
First item accessor of the modifiable queue. More... | |
const T & | GetTail (void) const |
Last item accessor of the read-only queue. More... | |
T & | GetTail (void) |
Last item accessor of the modifiable queue. More... | |
const T | RemoveHead (void) |
Add a new element at the head of the queue. More... | |
const T | RemoveTail (void) |
Add a new element at the tail of the queue. More... | |
const bool | Sort (const int(*cmp)(const T &, const T &)) |
Sort the list according to the given comparison function. More... | |
Main constructor.
UI_MaxCount | Maximum item count. |
Definition at line 323 of file tk_stl.h.
References UnusedParameter().
|
inline |
|
inline |
Add a new element at the tail of the queue.
T_Element | New element. |
Definition at line 477 of file tk_stl.h.
Referenced by Queue< T >::Sort().
Read-only item retrieval.
it | Current iterator. |
Definition at line 436 of file tk_stl.h.
Referenced by Queue< T >::Sort().
|
inline |
Item count.
Definition at line 358 of file tk_stl.h.
Referenced by Queue< T >::Sort().
|
inline |
First item accessor of the read-only queue.
Definition at line 488 of file tk_stl.h.
Referenced by Queue< T >::GetHead().
|
inline |
First item accessor of the modifiable queue.
Definition at line 496 of file tk_stl.h.
References Queue< T >::GetHead().
Iterator retrieval.
Definition at line 393 of file tk_stl.h.
Referenced by Queue< T >::Sort().
|
inline |
Last item accessor of the read-only queue.
Definition at line 506 of file tk_stl.h.
Referenced by Queue< T >::GetTail().
|
inline |
Last item accessor of the modifiable queue.
Definition at line 514 of file tk_stl.h.
References Queue< T >::GetTail().
|
inline |
Determines whether the queue is empty.
Definition at line 351 of file tk_stl.h.
Referenced by Queue< T >::Sort().
Checks the element at the given position is valid.
it | Iterator to check. |
Definition at line 400 of file tk_stl.h.
Referenced by Queue< T >::MoveNext(), and Queue< T >::Sort().
Iterates forward the iterator.
it | Iterator to move forward. |
Definition at line 426 of file tk_stl.h.
References Queue< T >::IsValid().
Referenced by Queue< T >::Sort().
|
inline |
|
inline |
Add a new element at the tail of the queue.
Definition at line 534 of file tk_stl.h.
Referenced by Queue< T >::Sort().
|
inline |
|
inline |
Sort the list according to the given comparison function.
cmp | Comparison function. Return positive value when then second argument should follow first one. |
Definition at line 544 of file tk_stl.h.
References Queue< T >::AddTail(), Queue< T >::GetAt(), Queue< T >::GetCount(), Queue< T >::GetIterator(), Queue< T >::IsEmpty(), Queue< T >::IsValid(), Queue< T >::MoveNext(), Queue< T >::RemoveTail(), and Queue< T >::Sort().
Referenced by Queue< T >::Sort().