#include <acsncCircularQueue.h>
List of all members.
Public Member Functions |
| | CircularQueue (unsigned int size=100) |
| | ~CircularQueue () |
| void | push (CosNotification::StructuredEvent e) |
| void | clear () |
| void | pop () |
| CosNotification::StructuredEvent * | front () |
| unsigned int | size () |
Private Attributes |
std::deque
< CosNotification::StructuredEvent > | queue |
| unsigned int | length |
| const unsigned int | max_size |
Detailed Description
Circular Queue implemented to maintain temporally structured events when the Notify Service is down.
Constructor & Destructor Documentation
| nc::CircularQueue::CircularQueue |
( |
unsigned int |
size = 100 |
) |
|
Initializes the Queue with custom value size, by default the size value is 100
- Parameters:
-
| size | the size of the queue |
| nc::CircularQueue::~CircularQueue |
( |
|
) |
|
Clears the internal queue
Member Function Documentation
| void nc::CircularQueue::clear |
( |
|
) |
|
Remove all the elements of the queue
| CosNotification::StructuredEvent* nc::CircularQueue::front |
( |
|
) |
|
Returns the first element of the circular queue, without removing it from the queue.
- Returns:
- the first element in the queue
| void nc::CircularQueue::pop |
( |
|
) |
|
Removes the first element in the queue and return it. If there is no elements in the queue returns null
| void nc::CircularQueue::push |
( |
CosNotification::StructuredEvent |
e |
) |
|
Insert a structured event at the end of the queue. If the queue is full, inserts the structured event and remove the first event in the queue
- Parameters:
-
| e | the event to be inserted in the queue |
- Exceptions:
-
| unsigned int nc::CircularQueue::size |
( |
|
) |
[inline] |
Member Data Documentation
The documentation for this class was generated from the following file: