|
nc::CircularQueue − |
|
#include <acsncCircularQueue.h> |
|
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 |
|
Circular Queue implemented to maintain temporally structured events when the Notify Service is down. |
|
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 |
|
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: |
|
EventDroppedException if the queue drop a message after to push the event e |
|
unsigned int nc::CircularQueue::size () [inline] |
|
References queue. |
|
unsigned int nc::CircularQueue::length [private] |
|
const unsigned int nc::CircularQueue::max_size [private] |
|
std::deque<CosNotification::StructuredEvent> nc::CircularQueue::queue [private] |
|
Referenced by size(). |
|
Generated automatically by Doxygen for ACS-2015.2 C++ API from the source code. |