Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members Related Pages

# ACE_Message_Queue_Base Class Reference

Workaround HP/C++ compiler bug with enums in templates. More...

`#include <Message_Queue.h>`

Inheritance diagram for ACE_Message_Queue_Base

[legend]
List of all members.

## Public Types
enum | { DEFAULT_HWM = 16 * 1024, DEFAULT_LWM = 16 * 1024, WAS_ACTIVE = 1, WAS_INACTIVE = 2 }
## Public Methods
| ACE_Message_Queue_Base (void)
virtual int | close (void) = 0
| Close down the message queue and release all resources.
virtual | ~ACE_Message_Queue_Base (void)
| Close down the message queue and release all resources.
virtual int | peek_dequeue_head (ACE_Message_Block *&first_item, ACE_Time_Value *timeout = 0) = 0
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
| True if queue is full, else false. True if queue is empty, else false.
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
| Returns true if <deactivated_> is enabled.
virtual ACE_Notification_Strategy* | notification_strategy (void) = 0
virtual void | notification_strategy (ACE_Notification_Strategy *s) = 0
virtual void | dump (void) const = 0
| Dump the state of an object.
## Public Attributes
| ACE_ALLOC_HOOK_DECLARE
| Declare the dynamic allocation hooks.
## Private Methods
void | operator= (const ACE_Message_Queue_Base &)
| ACE_Message_Queue_Base (const ACE_Message_Queue_Base &)

## Detailed Description

Workaround HP/C++ compiler bug with enums in templates.

The ever lamest HP/C++ compiler seems to fail if enums are defined inside a template, hence we have to move them into a base class.

## Member Enumeration Documentation

anonymous enum

  | Enumeration values:
  DEFAULT_HWM | Default high watermark (16 K).
  DEFAULT_LWM | Default low watermark (same as high water mark).
  WAS_ACTIVE | Message queue was active before or <deactivate>.
  WAS_INACTIVE | Message queue was inactive before or <deactivate>.

## Constructor & Destructor Documentation

ACE_INLINE ACE_Message_Queue_Base::ACE_Message_Queue_Base ( | void )

ACE_INLINE ACE_Message_Queue_Base::~ACE_Message_Queue_Base ( | void )`[virtual]`

| Close down the message queue and release all resources.

ACE_Message_Queue_Base::ACE_Message_Queue_Base ( | const ACE_Message_Queue_Base & )`[private]`

## Member Function Documentation

int ACE_Message_Queue_Base::activate ( | void )`[pure virtual]`

| Reactivate the queue so that threads can enqueue and dequeue messages again. Returns WAS_INACTIVE if queue was inactive before the call and WAS_ACTIVE if queue was active before the call. Reimplemented in ACE_Message_Queue.

int ACE_Message_Queue_Base::close ( | void )`[pure virtual]`

| Close down the message queue and release all resources. Reimplemented in ACE_Message_Queue.

int ACE_Message_Queue_Base::deactivate ( | void )`[pure virtual]`

| Deactivate the queue and wakeup all threads waiting on the queue so they can continue. No messages are removed from the queue, however. Any other operations called until the queue is activated again will immediately return -1 with <errno> == ESHUTDOWN. Returns WAS_INACTIVE if queue was inactive before the call and WAS_ACTIVE if queue was active before the call. Reimplemented in ACE_Message_Queue.

int ACE_Message_Queue_Base::deactivated ( | void )`[pure virtual]`

| Returns true if <deactivated_> is enabled. Reimplemented in ACE_Message_Queue.

virtual int ACE_Message_Queue_Base::dequeue ( | ACE_Message_Block *& first_item,
| ACE_Time_Value * timeout = 0 )`[pure virtual]`

| Reimplemented in ACE_Message_Queue.

int ACE_Message_Queue_Base::dequeue_head ( | ACE_Message_Block *& first_item,
| ACE_Time_Value * timeout = 0 )`[pure virtual]`

| Dequeue and return the at the head of the queue. Returns number of items in queue if the call succeeds or -1 otherwise. Dequeue and return the at the head of the queue. Returns number of items in queue if the call succeeds or -1 otherwise. Reimplemented in ACE_Message_Queue, and ACE_Dynamic_Message_Queue.

void ACE_Message_Queue_Base::dump ( | void ) const`[pure virtual]`

| Dump the state of an object. Reimplemented in ACE_Message_Queue, and ACE_Dynamic_Message_Queue.

virtual int ACE_Message_Queue_Base::enqueue ( | ACE_Message_Block * new_item,
| ACE_Time_Value * timeout = 0 )`[pure virtual]`

| Reimplemented in ACE_Message_Queue.

int ACE_Message_Queue_Base::enqueue_tail ( | ACE_Message_Block * new_item,
| ACE_Time_Value * timeout = 0 )`[pure virtual]`

| Enqueue a into the tail of the queue. Returns number of items in queue if the call succeeds or -1 otherwise. Enqueue a into the tail of the queue. Returns number of items in queue if the call succeeds or -1 otherwise. Reimplemented in ACE_Message_Queue, and ACE_Dynamic_Message_Queue.

virtual int ACE_Message_Queue_Base::is_empty ( | void )`[pure virtual]`

| Reimplemented in ACE_Message_Queue.

int ACE_Message_Queue_Base::is_full ( | void )`[pure virtual]`

| True if queue is full, else false. True if queue is empty, else false. Reimplemented in ACE_Message_Queue.

void ACE_Message_Queue_Base::message_bytes ( | size_t new_size )`[pure virtual]`

| New value of the number of total bytes on the queue, i.e., sum of the message block sizes. New value of the number of total length on the queue, i.e., sum of the message block lengths. Reimplemented in ACE_Message_Queue.

size_t ACE_Message_Queue_Base::message_bytes ( | void )`[pure virtual]`

| Number of total bytes on the queue, i.e., sum of the message block sizes. Number of total length on the queue, i.e., sum of the message block lengths. Number of total messages on the queue. Reimplemented in ACE_Message_Queue.

virtual size_t ACE_Message_Queue_Base::message_count ( | void )`[pure virtual]`

| Reimplemented in ACE_Message_Queue.

virtual void ACE_Message_Queue_Base::message_length ( | size_t new_length )`[pure virtual]`

| Reimplemented in ACE_Message_Queue.

virtual size_t ACE_Message_Queue_Base::message_length ( | void )`[pure virtual]`

| Reimplemented in ACE_Message_Queue.

virtual void ACE_Message_Queue_Base::notification_strategy ( | ACE_Notification_Strategy * s )`[pure virtual]`

| Reimplemented in ACE_Message_Queue.

virtual ACE_Notification_Strategy* ACE_Message_Queue_Base::notification_strategy ( | void )`[pure virtual]`

| Reimplemented in ACE_Message_Queue.

void ACE_Message_Queue_Base::operator= ( | const ACE_Message_Queue_Base & )`[private]`

int ACE_Message_Queue_Base::peek_dequeue_head ( | ACE_Message_Block *& first_item,
| ACE_Time_Value * timeout = 0 )`[pure virtual]`

| Retrieve the first without removing it. Note that <timeout> uses <{absolute}> time rather than <{relative}> time. If the <timeout> elapses without receiving a message -1 is returned and <errno> is set to <EWOULDBLOCK>. If the queue is deactivated -1 is returned and <errno> is set to <ESHUTDOWN>. Otherwise, returns -1 on failure, else the number of items still on the queue. Reimplemented in ACE_Message_Queue, and ACE_Dynamic_Message_Queue.

## Member Data Documentation

ACE_Message_Queue_Base::ACE_ALLOC_HOOK_DECLARE

| Declare the dynamic allocation hooks. Reimplemented in ACE_Message_Queue, and ACE_Dynamic_Message_Queue.

The documentation for this class was generated from the following files:

- Message_Queue.h
- Message_Queue.i