#include <SV_Message_Queue.h>
Public Types | |
| enum | { ACE_CREATE = IPC_CREAT, ACE_OPEN = 0, ACE_NOWAIT = IPC_NOWAIT } |
Public Methods | |
| ACE_SV_Message_Queue (void) | |
| Open a message queue using the <external_id>. More... | |
| ACE_SV_Message_Queue (key_t external_id, int create=ACE_SV_Message_Queue::ACE_OPEN, int perms=ACE_DEFAULT_FILE_PERMS) | |
| int | open (key_t external_id, int create=ACE_SV_Message_Queue::ACE_OPEN, int perms=ACE_DEFAULT_FILE_PERMS) |
| ~ACE_SV_Message_Queue (void) | |
| int | close (void) |
| Close down this instance of the message queue without removing it from the system. More... | |
| int | remove (void) |
| Close down and remove the message queue from the system. More... | |
| int | recv (ACE_SV_Message &mb, int length, long mtype=0, int mflags=0) |
| int | send (const ACE_SV_Message &mb, int length, int mflags=0) |
| int | control (int option, void *arg=0) |
| Access the underlying control operations. More... | |
| int | get_id (void) const |
| Get the underly internal id. More... | |
| void | set_id (int) |
| Set the underly internal id. More... | |
| void | dump (void) const |
| Dump the state of an object. More... | |
Public Attributes | |
| ACE_ALLOC_HOOK_DECLARE | |
| Declare the dynamic allocation hooks. More... | |
Protected Attributes | |
| int | internal_id_ |
| Returned from the underlying <msgget> system call. More... | |
Definition at line 32 of file SV_Message_Queue.h.
|
|
Definition at line 36 of file SV_Message_Queue.h.
00037 {
00038 ACE_CREATE = IPC_CREAT,
00039 ACE_OPEN = 0,
00040 ACE_NOWAIT = IPC_NOWAIT
00041 };
|
|
|
Open a message queue using the <external_id>.
Definition at line 22 of file SV_Message_Queue.cpp. References ACE_TRACE.
00023 {
00024 ACE_TRACE ("ACE_SV_Message_Queue::ACE_SV_Message_Queue");
00025 }
|
|
||||||||||||||||
|
Definition at line 32 of file SV_Message_Queue.cpp. References ACE_ERROR, ACE_LIB_TEXT, ACE_TRACE, LM_ERROR, and open.
00035 {
00036 ACE_TRACE ("ACE_SV_Message_Queue::ACE_SV_Message_Queue");
00037 if (this->open (external_id, create, perms) == -1)
00038 ACE_ERROR ((LM_ERROR, ACE_LIB_TEXT ("%p\n"),
00039 ACE_LIB_TEXT ("ACE_SV_Message_Queue::ACE_SV_Message_Queue")));
00040 }
|
|
|
Definition at line 27 of file SV_Message_Queue.cpp. References ACE_TRACE.
00028 {
00029 ACE_TRACE ("ACE_SV_Message_Queue::~ACE_SV_Message_Queue");
00030 }
|
|
|
Close down this instance of the message queue without removing it from the system.
Definition at line 20 of file SV_Message_Queue.i. References ACE_TRACE, and internal_id_.
00021 {
00022 ACE_TRACE ("ACE_SV_Message_Queue::close");
00023 this->internal_id_ = -1;
00024 return 1;
00025 }
|
|
||||||||||||
|
Access the underlying control operations.
Definition at line 28 of file SV_Message_Queue.i. References ACE_TRACE, and ACE_OS::msgctl. Referenced by ACE_Typed_SV_Message_Queue::control, and remove.
00029 {
00030 ACE_TRACE ("ACE_SV_Message_Queue::control");
00031 return ACE_OS::msgctl (this->internal_id_, option,
00032 (msqid_ds *) arg);
00033 }
|
|
|
Dump the state of an object.
Definition at line 17 of file SV_Message_Queue.cpp. References ACE_TRACE.
00018 {
00019 ACE_TRACE ("ACE_SV_Message_Queue::dump");
00020 }
|
|
|
Get the underly internal id.
Definition at line 45 of file SV_Message_Queue.i. References ACE_TRACE, and internal_id_. Referenced by ACE_Typed_SV_Message_Queue::get_id.
00046 {
00047 ACE_TRACE ("ACE_SV_Message_Queue::get_id");
00048 return this->internal_id_;
00049 }
|
|
||||||||||||||||
|
Definition at line 11 of file SV_Message_Queue.i. References ACE_TRACE, internal_id_, and ACE_OS::msgget. Referenced by ACE_SV_Message_Queue, and ACE_Typed_SV_Message_Queue::open.
00012 {
00013 ACE_TRACE ("ACE_SV_Message_Queue::open");
00014 return this->internal_id_ = ACE_OS::msgget (external_id, create | perms);
00015 }
|
|
||||||||||||||||||||
|
Definition at line 59 of file SV_Message_Queue.i. References ACE_TRACE, and ACE_OS::msgrcv. Referenced by ACE_Typed_SV_Message_Queue::recv.
00063 {
00064 ACE_TRACE ("ACE_SV_Message_Queue::recv");
00065 return ACE_OS::msgrcv (this->internal_id_, (void *) &mb,
00066 length, type, mflags);
00067 }
|
|
|
Close down and remove the message queue from the system.
Definition at line 36 of file SV_Message_Queue.i. References ACE_TRACE, control, internal_id_, and IPC_RMID. Referenced by ACE_Typed_SV_Message_Queue::remove.
00037 {
00038 ACE_TRACE ("ACE_SV_Message_Queue::remove");
00039 int result = this->control (IPC_RMID);
00040 this->internal_id_ = -1;
00041 return result;
00042 }
|
|
||||||||||||||||
|
Definition at line 70 of file SV_Message_Queue.i. References ACE_TRACE, and ACE_OS::msgsnd.
00073 {
00074 ACE_TRACE ("ACE_SV_Message_Queue::send");
00075 return ACE_OS::msgsnd (this->internal_id_, (void *) &mb,
00076 length, mflags);
00077 }
|
|
|
Set the underly internal id.
Definition at line 52 of file SV_Message_Queue.i. References ACE_TRACE, and internal_id_.
00053 {
00054 ACE_TRACE ("ACE_SV_Message_Queue::set_id");
00055 this->internal_id_ = id;
00056 }
|
|
|
Declare the dynamic allocation hooks.
Definition at line 85 of file SV_Message_Queue.h. |
|
|
Returned from the underlying <msgget> system call.
Definition at line 89 of file SV_Message_Queue.h. |
1.2.14 written by Dimitri van Heesch,
© 1997-2002