diff options
author | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1996-10-21 21:41:34 +0000 |
---|---|---|
committer | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1996-10-21 21:41:34 +0000 |
commit | a5fdebc5f6375078ec1763850a4ca23ec7fe6458 (patch) | |
tree | bcf0a25c3d45a209a6e3ac37b233a4812f29c732 /ace/Typed_SV_Message.h | |
download | ATCD-a5fdebc5f6375078ec1763850a4ca23ec7fe6458.tar.gz |
Initial revision
Diffstat (limited to 'ace/Typed_SV_Message.h')
-rw-r--r-- | ace/Typed_SV_Message.h | 88 |
1 files changed, 88 insertions, 0 deletions
diff --git a/ace/Typed_SV_Message.h b/ace/Typed_SV_Message.h new file mode 100644 index 00000000000..08e5ffc70dc --- /dev/null +++ b/ace/Typed_SV_Message.h @@ -0,0 +1,88 @@ +/* -*- C++ -*- */ +// $Id$ + + +// ============================================================================ +// +// = LIBRARY +// ace +// +// = FILENAME +// Typed_SV_Message.h +// +// = AUTHOR +// Doug Schmidt +// +// ============================================================================ + +#if !defined (ACE_TYPED_SV_MESSAGE_H) +#define ACE_TYPED_SV_MESSAGE_H + +#include "ace/ACE.h" + +template <class T> +class ACE_Typed_SV_Message + // = TITLE + // Defines the header file for the C++ wrapper for System V + // message queues. +{ +public: + // = Initialization and termination methods. + ACE_Typed_SV_Message (long type = 0, + int length = sizeof (T), + int max_size = sizeof (T)); + ACE_Typed_SV_Message (const T &data, + long type = 0, + int length = sizeof (T), + int max_size = sizeof (T)); + ~ACE_Typed_SV_Message (void); + + // = Get/set the type of the message. + long type (void) const; + void type (long type); + + // = Get/set the length of the message. + int length (void) const; + void length (int l); + + // = Get/set the maximum size of the message. + int max_size (void) const; + void max_size (int m); + + // = Get/set a pointer to the data in the message. + T &data (void); + void data (const T &data); + + void dump (void) const; + // Dump the state of an object. + + ACE_ALLOC_HOOK_DECLARE; + // Declare the dynamic allocation hooks. + +private: + long type_; + // Type of message. + + int length_; + // Length of this message. + + int max_; + // Maximum length of any message. + + T data_; + // Data stored in a message. +}; + +#if defined (__ACE_INLINE__) +#include "ace/Typed_SV_Message.i" +#endif /* __ACE_INLINE__ */ + +#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) +#include "ace/Typed_SV_Message.cpp" +#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ + +#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) +#pragma implementation ("Typed_SV_Message.cpp") +#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ + +#endif /* ACE_TYPED_SV_MESSAGE_H */ |