#include <ace/Message_Queue.h>
class ACE_Message_Queue_Base {
public:
enum{ DEFAULT_HWM = 16 * 1024, DEFAULT_LWM = 16 * 1024, WAS_ACTIVE = 1, WAS_INACTIVE = 2 };ACE_Message_Queue_Base (void);
virtual int close (void) = 0;
virtual ~ACE_Message_Queue_Base (void);
virtual int enqueue_tail ( ACE_Message_Block *new_item, ACE_Time_Value *timeout = 0 ) = 0;
virtual int enqueue ( ACE_Message_Block *new_item, ACE_Time_Value *timeout = 0 ) = 0;
virtual int dequeue_head ( ACE_Message_Block *&first_item, ACE_Time_Value *timeout = 0 ) = 0;
virtual int dequeue ( ACE_Message_Block *&first_item, ACE_Time_Value *timeout = 0 ) = 0;
virtual int is_full (void) = 0;
virtual int is_empty (void) = 0;
virtual size_t message_bytes (void) = 0;
virtual size_t message_length (void) = 0;
virtual size_t message_count (void) = 0;
virtual void message_bytes (size_t new_size) = 0;
virtual void message_length (size_t new_length) = 0;
virtual int deactivate (void) = 0;
virtual int activate (void) = 0;
virtual int deactivated (void) = 0;
virtual void dump (void) const = 0;
ACE_ALLOC_HOOK_DECLARE;
private:
inline ACE_UNIMPLEMENTED_FUNC ( void operator= (const ACE_Message_Queue_Base &) );
};
ACE_Message_Queue_Base (void);
virtual int close (void) = 0;
virtual ~ACE_Message_Queue_Base (void);
timeout
== 0,
the caller will block until action is possible, else will wait
until the absolute time specified in *timeout
elapses). These
calls will return, however, when queue is closed, deactivated,
when a signal occurs, or if the time specified in timeout
elapses, (in which case errno = EWOULDBLOCK).
virtual int enqueue_tail (
ACE_Message_Block *new_item,
ACE_Time_Value *timeout = 0
) = 0;
virtual int enqueue (
ACE_Message_Block *new_item,
ACE_Time_Value *timeout = 0
) = 0;
ACE_Message_Block *
into the tail of the queue.
Return -1 on failure, number of items in queue otherwise.
virtual int dequeue_head (
ACE_Message_Block *&first_item,
ACE_Time_Value *timeout = 0
) = 0;
virtual int dequeue (
ACE_Message_Block *&first_item,
ACE_Time_Value *timeout = 0
) = 0;
ACE_Message_Block *
at the head of the
queue. Returns -1 on failure, else the number of items still on
the queue.
virtual int is_full (void) = 0;
virtual int is_empty (void) = 0;
virtual size_t message_bytes (void) = 0;
virtual size_t message_length (void) = 0;
virtual size_t message_count (void) = 0;
virtual void message_bytes (size_t new_size) = 0;
virtual void message_length (size_t new_length) = 0;
virtual int deactivate (void) = 0;
errno
==
ESHUTDOWN. Returns WAS_INACTIVE if queue was inactive before the
call and WAS_ACTIVE if queue was active before the call.
virtual int activate (void) = 0;
virtual int deactivated (void) = 0;
deactivated_
is enabled.
virtual void dump (void) const = 0;
ACE_ALLOC_HOOK_DECLARE;
inline ACE_UNIMPLEMENTED_FUNC (
void operator= (const ACE_Message_Queue_Base &)
);