nc::CircularQueue Class Reference
#include <acsncCircularQueue.h>
List of all members.
Public Member Functions |
| CircularQueue (unsigned int size=100) |
void | push (CosNotification::StructuredEvent e) |
void | clear () |
CosNotification::StructuredEvent * | pop () |
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 |
Member Function Documentation
void nc::CircularQueue::clear |
( |
|
) |
|
Remove all the elements of the queue
CosNotification::StructuredEvent* nc::CircularQueue::pop |
( |
|
) |
|
Remove the first element in the queue and return it. If there is no elements in the queue returns null
- Returns:
- the first element in the queue
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:
-
Member Data Documentation
The documentation for this class was generated from the following file: