3 //=============================================================================
5 * @file Incoming_Message_Stack.h
7 * @author Frank Rehberger <frehberg@prismtech.com>
9 //=============================================================================
11 #ifndef TAO_INCOMING_MESSAGE_STACK_H
12 #define TAO_INCOMING_MESSAGE_STACK_H
14 #include /**/ "ace/pre.h"
16 #include "tao/Queued_Data.h"
18 #if !defined (ACE_LACKS_PRAGMA_ONCE)
20 #endif /* ACE_LACKS_PRAGMA_ONCE */
22 #include /**/ "tao/TAO_Export.h"
24 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
26 ACE_END_VERSIONED_NAMESPACE_DECL
28 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
33 * @class Incoming_Message_Stack
35 * @brief Implements stack for TAO_Queued_Data.
37 * Internal class, providing stack functionality for TAO_Queued_Data
38 * objects. Stack operations don't require memory allocation.
40 class TAO_Export Incoming_Message_Stack
43 /// default constructor, initiliazes empty stack.
44 Incoming_Message_Stack();
46 /// destructor, releases all elements on stack
47 ~Incoming_Message_Stack() ;
49 /// pushing a new element onto stack,
50 /// @a data must be a valid pointer, not NULL
51 void push(TAO_Queued_Data
*data
);
53 /// removing top element of stack,
54 /// @return 0 for Ok and @a data is defined, -1 for error
55 int pop (TAO_Queued_Data
* &data
);
57 /// peeking top element of stack
58 /// @return 0 for Ok, -1 for error
59 int top (TAO_Queued_Data
* &data
) const;
62 /// Top element of stack
63 TAO_Queued_Data
*top_
;
66 /// Default Copy-Constructor - not for public usage.
67 Incoming_Message_Stack (const Incoming_Message_Stack
&);
69 /// Assignment operator - not for public usage
70 Incoming_Message_Stack
& operator= (Incoming_Message_Stack
& other
);
74 TAO_END_VERSIONED_NAMESPACE_DECL
76 #if defined (__ACE_INLINE__)
77 # include "tao/Incoming_Message_Stack.inl"
78 #endif /* __ACE_INLINE__ */
80 #include /**/ "ace/post.h"
81 #endif /*TAO_INCOMING_MESSAGE_STACK_H*/