Implements stack for TAO_Queued_Data. More...
#include <Incoming_Message_Stack.h>
Public Member Functions | |
Incoming_Message_Stack () | |
default constructor, initiliazes empty stack. | |
~Incoming_Message_Stack () | |
destructor, releases all elements on stack | |
void | push (TAO_Queued_Data *data) |
int | pop (TAO_Queued_Data *&data) |
int | top (TAO_Queued_Data *&data) const |
Private Member Functions | |
Incoming_Message_Stack (const Incoming_Message_Stack &) | |
Default Copy-Constructor - not for public usage. | |
Incoming_Message_Stack & | operator= (Incoming_Message_Stack &other) |
Assignment operator - not for public usage. | |
Private Attributes | |
TAO_Queued_Data * | top_ |
Top element of stack. |
Implements stack for TAO_Queued_Data.
Internal class, providing stack functionality for TAO_Queued_Data objects. Stack operations don't require memory allocation.
Definition at line 47 of file Incoming_Message_Stack.h.
TAO::Incoming_Message_Stack::Incoming_Message_Stack | ( | ) |
default constructor, initiliazes empty stack.
Definition at line 13 of file Incoming_Message_Stack.inl.
: top_(0) { }
TAO::Incoming_Message_Stack::~Incoming_Message_Stack | ( | ) |
destructor, releases all elements on stack
Definition at line 19 of file Incoming_Message_Stack.inl.
{ // Delete all the nodes left behind TAO_Queued_Data *del = 0; while (this->pop (del) != -1) { TAO_Queued_Data::release (del); } }
TAO::Incoming_Message_Stack::Incoming_Message_Stack | ( | const Incoming_Message_Stack & | ) | [private] |
Default Copy-Constructor - not for public usage.
Incoming_Message_Stack& TAO::Incoming_Message_Stack::operator= | ( | Incoming_Message_Stack & | other | ) | [private] |
Assignment operator - not for public usage.
int TAO::Incoming_Message_Stack::pop | ( | TAO_Queued_Data *& | data | ) |
removing top element of stack,
Definition at line 40 of file Incoming_Message_Stack.inl.
void TAO::Incoming_Message_Stack::push | ( | TAO_Queued_Data * | data | ) |
pushing a new element onto stack, data must be a valid pointer, not NULL
Definition at line 31 of file Incoming_Message_Stack.inl.
int TAO::Incoming_Message_Stack::top | ( | TAO_Queued_Data *& | data | ) | const |
peeking top element of stack
Definition at line 52 of file Incoming_Message_Stack.inl.
{ if (this->top_ == 0) return -1; data = this->top_; return 0; }
TAO_Queued_Data* TAO::Incoming_Message_Stack::top_ [private] |
Top element of stack.
Definition at line 71 of file Incoming_Message_Stack.h.