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

ACE_Typed_SV_Message_Queue Class Template Reference

Defines the header file for the C++ wrapper facade for typed message queues. More...

#include <Typed_SV_Message_Queue.h>

Collaboration diagram for ACE_Typed_SV_Message_Queue:

Collaboration graph
[legend]
List of all members.

Public Types

enum  { ACE_CREATE = IPC_CREAT, ACE_OPEN = 0, ACE_NOWAIT = IPC_NOWAIT }

Public Methods

 ACE_Typed_SV_Message_Queue (void)
 ACE_Typed_SV_Message_Queue (key_t external_id, int create=ACE_OPEN, int perms=ACE_DEFAULT_FILE_PERMS)
int open (key_t external_id, int create=ACE_OPEN, int perms=ACE_DEFAULT_FILE_PERMS)
int close (void)
int remove (void)
 ~ACE_Typed_SV_Message_Queue (void)
int send (const ACE_Typed_SV_Message< T > &mb, int mflags=0)
 Send method. More...

int recv (ACE_Typed_SV_Message< T > &mb, int mflags=0)
 Recv method. More...

int get_id (void) const
 Return the id of the underlying ACE_SV_Message_Queue. More...

int control (int option, void *arg=0)
 Control the underlying message queue. More...

void dump (void) const
 Dump the state of an object. More...


Public Attributes

 ACE_ALLOC_HOOK_DECLARE
 Declare the dynamic allocation hooks. More...


Private Attributes

ACE_SV_Message_Queue message_queue_

Detailed Description

template<class T>
class ACE_Typed_SV_Message_Queue< T >

Defines the header file for the C++ wrapper facade for typed message queues.

Definition at line 31 of file Typed_SV_Message_Queue.h.


Member Enumeration Documentation

template<class T>
anonymous enum
 

Enumeration values:
ACE_CREATE 
ACE_OPEN 
ACE_NOWAIT 

Definition at line 34 of file Typed_SV_Message_Queue.h.

00035   {
00036     ACE_CREATE = IPC_CREAT,
00037     ACE_OPEN = 0,
00038     ACE_NOWAIT = IPC_NOWAIT
00039   };


Constructor & Destructor Documentation

template<class T>
ACE_Typed_SV_Message_Queue< T >::ACE_Typed_SV_Message_Queue void   
 

Definition at line 31 of file Typed_SV_Message_Queue.cpp.

References ACE_TRACE.

00032 {
00033   ACE_TRACE ("ACE_Typed_SV_Message_Queue<T>::ACE_Typed_SV_Message_Queue");
00034 }

template<class T>
ACE_Typed_SV_Message_Queue< T >::ACE_Typed_SV_Message_Queue key_t    external_id,
int    create = ACE_OPEN,
int    perms = ACE_DEFAULT_FILE_PERMS
 

Definition at line 37 of file Typed_SV_Message_Queue.cpp.

References ACE_ERROR, ACE_TRACE, LM_ERROR, and open.

00040 {
00041   ACE_TRACE ("ACE_Typed_SV_Message_Queue<T>::ACE_Typed_SV_Message_Queue");
00042   if (this->open (external_id, create, perms) == -1)
00043     ACE_ERROR ((LM_ERROR,
00044                 "ACE_Typed_SV_Message_Queue::ACE_Typed_SV_Message_Queue"));
00045 }

template<class T>
ACE_Typed_SV_Message_Queue< T >::~ACE_Typed_SV_Message_Queue void   
 

Definition at line 48 of file Typed_SV_Message_Queue.cpp.

References ACE_TRACE.

00049 {
00050   ACE_TRACE ("ACE_Typed_SV_Message_Queue<T>::~ACE_Typed_SV_Message_Queue");
00051 }


Member Function Documentation

template<class T>
ACE_INLINE int ACE_Typed_SV_Message_Queue< T >::close void   
 

Definition at line 20 of file Typed_SV_Message_Queue.i.

References ACE_TRACE.

00021 {
00022   ACE_TRACE ("ACE_Typed_SV_Message_Queue<T>::close");
00023   return 1;
00024 }

template<class T>
ACE_INLINE int ACE_Typed_SV_Message_Queue< T >::control int    option,
void *    arg = 0
 

Control the underlying message queue.

Definition at line 65 of file Typed_SV_Message_Queue.i.

References ACE_TRACE, ACE_SV_Message_Queue::control, and message_queue_.

00067 {
00068   ACE_TRACE ("ACE_Typed_SV_Message_Queue<T>::control");
00069 
00070   return this->message_queue_.control (option, arg);
00071 }

template<class T>
void ACE_Typed_SV_Message_Queue< T >::dump void    const
 

Dump the state of an object.

Definition at line 25 of file Typed_SV_Message_Queue.cpp.

References ACE_TRACE.

00026 {
00027   ACE_TRACE ("ACE_Typed_SV_Message_Queue<T>::dump");
00028 }

template<class T>
ACE_INLINE int ACE_Typed_SV_Message_Queue< T >::get_id void    const
 

Return the id of the underlying ACE_SV_Message_Queue.

Definition at line 74 of file Typed_SV_Message_Queue.i.

References ACE_SV_Message_Queue::get_id, and message_queue_.

00075 {
00076   return this->message_queue_.get_id ();
00077 }

template<class T>
ACE_INLINE int ACE_Typed_SV_Message_Queue< T >::open key_t    external_id,
int    create = ACE_OPEN,
int    perms = ACE_DEFAULT_FILE_PERMS
 

Definition at line 9 of file Typed_SV_Message_Queue.i.

References ACE_TRACE, message_queue_, and ACE_SV_Message_Queue::open.

Referenced by ACE_Typed_SV_Message_Queue.

00012 {
00013   ACE_TRACE ("ACE_Typed_SV_Message_Queue<T>::open");
00014   return this->message_queue_.open (external_id, create, perms);
00015 }

template<class T>
ACE_INLINE int ACE_Typed_SV_Message_Queue< T >::recv ACE_Typed_SV_Message< T > &    mb,
int    mflags = 0
 

Recv method.

Definition at line 27 of file Typed_SV_Message_Queue.i.

References ACE_TRACE, ACE_Typed_SV_Message::length, ACE_Typed_SV_Message::max_size, message_queue_, ACE_SV_Message_Queue::recv, and ACE_Typed_SV_Message::type.

00029 {
00030   ACE_TRACE ("ACE_Typed_SV_Message_Queue<T>::recv");
00031 
00032   int length = this->message_queue_.recv (ACE_reinterpret_cast (ACE_SV_Message &,
00033                                                                 mb),
00034                                           mb.max_size (),
00035                                           mb.type (),
00036                                           mflags);
00037   if (length != -1)
00038     mb.length (length);
00039 
00040   return length;
00041 }

template<class T>
ACE_INLINE int ACE_Typed_SV_Message_Queue< T >::remove void   
 

Definition at line 57 of file Typed_SV_Message_Queue.i.

References ACE_TRACE, message_queue_, and ACE_SV_Message_Queue::remove.

00058 {
00059   ACE_TRACE ("ACE_Typed_SV_Message_Queue<T>::remove");
00060 
00061   return this->message_queue_.remove ();
00062 }

template<class T>
ACE_INLINE int ACE_Typed_SV_Message_Queue< T >::send const ACE_Typed_SV_Message< T > &    mb,
int    mflags = 0
 

Send method.

Definition at line 44 of file Typed_SV_Message_Queue.i.

References ACE_TRACE, ACE_Typed_SV_Message::length, and message_queue_.

00046 {
00047   ACE_TRACE ("ACE_Typed_SV_Message_Queue<T>::send");
00048   return this->message_queue_.
00049     send (ACE_reinterpret_cast (ACE_SV_Message &,
00050                                 ACE_const_cast (ACE_Typed_SV_Message<T> &,
00051                                                 mb)),
00052           mb.length (),
00053           mflags);
00054 }


Member Data Documentation

template<class T>
ACE_Typed_SV_Message_Queue::ACE_ALLOC_HOOK_DECLARE
 

Declare the dynamic allocation hooks.

Definition at line 69 of file Typed_SV_Message_Queue.h.

template<class T>
ACE_SV_Message_Queue ACE_Typed_SV_Message_Queue::message_queue_ [private]
 

Definition at line 72 of file Typed_SV_Message_Queue.h.

Referenced by control, get_id, open, recv, remove, and send.


The documentation for this class was generated from the following files:
Generated on Mon Jun 16 12:58:48 2003 for ACE by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002