Queue (FIFO -> First In First Out) template.
More...
#include <Queue.h>
List of all members.
Public Member Functions |
| Queue () |
| Constructor.
|
| Queue (const Queue< ValueType > &cSource) |
| Copy constructor.
|
| ~Queue () |
| Destructor.
|
bool | Push (const ValueType &Element) |
| Push an element onto the queue (enqueue)
|
bool | Pop (ValueType *pElement=nullptr) |
| Pops the bottom element from the queue (dequeue)
|
ValueType | Bottom () const |
| Returns the bottom element without removing it.
|
uint32 | GetNumOfElements () const |
| Returns the number of elements on the queue.
|
Queue< ValueType > & | operator= (const Queue< ValueType > &cSource) |
| Copies the data from another queue.
|
void | Clear () |
| Clears the whole queue.
|
Detailed Description
template<class ValueType>
class PLCore::Queue< ValueType >
Queue (FIFO -> First In First Out) template.
Constructor & Destructor Documentation
template<class ValueType >
template<class ValueType>
Copy constructor.
- Parameters:
-
[in] | cSource | Source queue to copy from |
template<class ValueType >
Member Function Documentation
template<class ValueType>
Push an element onto the queue (enqueue)
Push an element onto the queue.
- Parameters:
-
- Returns:
- 'true' if all went fine, else 'false'
template<class ValueType>
Pops the bottom element from the queue (dequeue)
Pops the bottom element from the queue.
- Parameters:
-
[out] | pElement | If not a null pointer, this will receive the popped element |
- Returns:
- 'true' if all went fine, else 'false'
- Note:
- On error, pElement is NOT touched, so ensure that you take this case into account!
template<class ValueType >
Returns the bottom element without removing it.
Get the bottom element without removing it.
- Returns:
- Bottom queue element
template<class ValueType >
Returns the number of elements on the queue.
Returns the number of element on the queue.
- Returns:
- Number of queue elements
template<class ValueType>
Copies the data from another queue.
- Parameters:
-
[in] | cSource | Queue to copy from |
- Returns:
- Reference to this instance
template<class ValueType >
The documentation for this class was generated from the following files: