[7297] Fixed profession spells sorting in trainer spell list at client.
[getmangos.git] / dep / ACE_wrappers / ace / Typed_SV_Message.h
blobb43258e01a3c9d947603c4c677b7ed3dbadf27cd
1 // -*- C++ -*-
3 //==========================================================================
4 /**
5 * @file Typed_SV_Message.h
7 * $Id: Typed_SV_Message.h 80826 2008-03-04 14:51:23Z wotte $
9 * @author Doug Schmidt
11 //==========================================================================
14 #ifndef ACE_TYPED_SV_MESSAGE_H
15 #define ACE_TYPED_SV_MESSAGE_H
17 #include /**/ "ace/pre.h"
19 #include /**/ "ace/ACE_export.h"
21 #if !defined (ACE_LACKS_PRAGMA_ONCE)
22 # pragma once
23 #endif /* ACE_LACKS_PRAGMA_ONCE */
25 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
27 /**
28 * @class ACE_Typed_SV_Message
30 * @brief Defines the header file for the C++ wrapper for System V
31 * message queues.
33 template <class T>
34 class ACE_Typed_SV_Message
36 public:
37 // = Initialization and termination methods.
38 ACE_Typed_SV_Message (long type = 0,
39 int length = sizeof (T),
40 int max_size = sizeof (T));
41 ACE_Typed_SV_Message (const T &data,
42 long type = 0,
43 int length = sizeof (T),
44 int max_size = sizeof (T));
45 ~ACE_Typed_SV_Message (void);
47 /// Get the type of the message.
48 long type (void) const;
50 /// Set the type of the message.
51 void type (long type);
53 /// Get the length of the message.
54 int length (void) const;
56 /// Set the length of the message.
57 void length (int l);
59 /// Get the maximum size of the message.
60 int max_size (void) const;
62 /// Set the maximum size of the message.
63 void max_size (int m);
65 /// Get a pointer to the data in the message.
66 T &data (void);
68 /// Set a pointer to the data in the message.
69 void data (const T &data);
71 /// Dump the state of an object.
72 void dump (void) const;
74 /// Declare the dynamic allocation hooks.
75 ACE_ALLOC_HOOK_DECLARE;
77 private:
78 /// Type of message.
79 long type_;
81 /// Length of this message.
82 int length_;
84 /// Maximum length of any message.
85 int max_;
87 /// Data stored in a message.
88 T data_;
91 ACE_END_VERSIONED_NAMESPACE_DECL
93 #if defined (__ACE_INLINE__)
94 #include "ace/Typed_SV_Message.inl"
95 #endif /* __ACE_INLINE__ */
97 #if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
98 #include "ace/Typed_SV_Message.cpp"
99 #endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
101 #if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
102 #pragma implementation ("Typed_SV_Message.cpp")
103 #endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
105 #include /**/ "ace/post.h"
107 #endif /* ACE_TYPED_SV_MESSAGE_H */