00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #ifndef ACE_TYPED_SV_MESSAGE_H
00015 #define ACE_TYPED_SV_MESSAGE_H
00016
00017 #include "ace/pre.h"
00018
00019 #include "ace/ACE_export.h"
00020
00021 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00022 # pragma once
00023 #endif
00024
00025 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00026
00027
00028
00029
00030
00031
00032
00033 template <class T>
00034 class ACE_Typed_SV_Message
00035 {
00036 public:
00037
00038 ACE_Typed_SV_Message (long type = 0,
00039 int length = sizeof (T),
00040 int max_size = sizeof (T));
00041 ACE_Typed_SV_Message (const T &data,
00042 long type = 0,
00043 int length = sizeof (T),
00044 int max_size = sizeof (T));
00045 ~ACE_Typed_SV_Message (void);
00046
00047
00048 long type (void) const;
00049
00050
00051 void type (long type);
00052
00053
00054 int length (void) const;
00055
00056
00057 void length (int l);
00058
00059
00060 int max_size (void) const;
00061
00062
00063 void max_size (int m);
00064
00065
00066 T &data (void);
00067
00068
00069 void data (const T &data);
00070
00071
00072 void dump (void) const;
00073
00074
00075 ACE_ALLOC_HOOK_DECLARE;
00076
00077 private:
00078
00079 long type_;
00080
00081
00082 int length_;
00083
00084
00085 int max_;
00086
00087
00088 T data_;
00089 };
00090
00091 ACE_END_VERSIONED_NAMESPACE_DECL
00092
00093 #if defined (__ACE_INLINE__)
00094 #include "ace/Typed_SV_Message.inl"
00095 #endif
00096
00097 #if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
00098 #include "ace/Typed_SV_Message.cpp"
00099 #endif
00100
00101 #if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
00102 #pragma implementation ("Typed_SV_Message.cpp")
00103 #endif
00104
00105 #include "ace/post.h"
00106
00107 #endif