diff options
author | nobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-10-11 15:10:34 +0000 |
---|---|---|
committer | nobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-10-11 15:10:34 +0000 |
commit | 23111468052a9f4ec607b9b10123f62004348216 (patch) | |
tree | f81e272d0159b645be87a876da75ae4911e4dfaa /examples/System_V_IPC/SV_Message_Queues/test.h | |
parent | d71e1419e3c009e237fec7a91e832be8fc0fe31a (diff) | |
download | ATCD-TAO-1_0_6.tar.gz |
This commit was manufactured by cvs2svn to create tag 'TAO-1_0_6'.TAO-1_0_6
Diffstat (limited to 'examples/System_V_IPC/SV_Message_Queues/test.h')
-rw-r--r-- | examples/System_V_IPC/SV_Message_Queues/test.h | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/examples/System_V_IPC/SV_Message_Queues/test.h b/examples/System_V_IPC/SV_Message_Queues/test.h deleted file mode 100644 index b3da2877bc7..00000000000 --- a/examples/System_V_IPC/SV_Message_Queues/test.h +++ /dev/null @@ -1,58 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -#include "ace/OS.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/SV_Message.h" - -#define MSGSZ 128 -#define SRV_KEY ACE_DEFAULT_SHM_KEY -#define SRV_ID 1 - -class Message_Data -{ -public: - Message_Data (long p = -1, - const char user[] = "", - const char text[] = ""): pid_ (p) - { - ::strncpy (this->username_, user, 9); - ::strncpy (this->mtext_, text, MSGSZ); - } - - long pid (void) { return this->pid_; } - void pid (long p) { this->pid_ = p; } - char *user (void) { return this->username_; } - void user (char user[]) { ::strncpy (this->username_, user, 9); } - char *text (void) { return this->mtext_; } - void text (char text[]) { ::strncpy (this->mtext_, text, MSGSZ); } - int length (void) { return sizeof *this - sizeof this->mtext_ + ::strlen (this->mtext_) + 1; } - -protected: - long pid_; - char username_[9]; - char mtext_[MSGSZ]; -}; - -class Message_Block : public ACE_SV_Message, public Message_Data -{ - // = TITLE - // Stores message content. - // = DESCRIPTION - // This may not be 100 percent portable on all C++ compilers since - // it relies on inheritance to be "concatenation." - // -public: - Message_Block (long t, - long p = 0, - const char login[] = "", - const char message[] = "") - : ACE_SV_Message (t), - Message_Data (p, login, message) - {} -}; - |