blob: 5dd44314bb772dd7608e419f357d161d29bb8bb7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
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 */
|