Main Page
Namespace List
Class Hierarchy
Alphabetical List
Compound List
File List
Namespace Members
Compound Members
File Members
Source
igtlStringMessage.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: The OpenIGTLink Library
4
Language: C++
5
Web page: http://openigtlink.org/
6
7
Copyright (c) Insight Software Consortium. All rights reserved.
8
9
This software is distributed WITHOUT ANY WARRANTY; without even
10
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11
PURPOSE. See the above copyright notices for more information.
12
13
=========================================================================*/
14
15
#ifndef __igtlStringMessage_h
16
#define __igtlStringMessage_h
17
18
#include <string>
19
20
#include "
igtlObject.h
"
21
#include "
igtlMath.h
"
22
#include "
igtlMessageBase.h
"
23
#include "
igtlTypes.h
"
24
25
#define IGTL_STRING_MESSAGE_DEFAULT_ENCODING 3
/* Default encoding -- ANSI-X3.5-1968 */
26
27
namespace
igtl
28
{
29
31
class
IGTLCommon_EXPORT
StringMessage
:
public
MessageBase
32
{
33
public
:
34
typedef
StringMessage
Self
;
35
typedef
MessageBase
Superclass
;
36
typedef
SmartPointer<Self>
Pointer
;
37
typedef
SmartPointer<const Self>
ConstPointer
;
38
39
igtlTypeMacro
(
igtl::StringMessage
,
igtl::MessageBase
);
40
igtlNewMacro
(
igtl::StringMessage
);
41
42
public
:
43
45
int
SetString(
const
char
*
string
);
46
48
int
SetString(std::string &
string
);
49
53
int
SetEncoding(igtlUint16 enc);
54
56
const
char
* GetString();
57
60
igtlUint16 GetEncoding();
61
62
protected
:
63
StringMessage
();
64
~
StringMessage
();
65
66
protected
:
67
68
virtual
int
GetBodyPackSize();
69
virtual
int
PackBody();
70
virtual
int
UnpackBody();
71
74
igtlUint16
m_Encoding
;
75
77
std::string
m_String
;
78
79
};
80
81
82
}
// namespace igtl
83
84
#endif // _igtlStringMessage_h
85
86
87
igtl::StringMessage::Superclass
MessageBase Superclass
Definition:
igtlStringMessage.h:35
igtlMessageBase.h
igtl::StringMessage::Self
StringMessage Self
Definition:
igtlStringMessage.h:34
igtl::StringMessage
THe STRING message type is used for transferring a character string. It supports character strings up...
Definition:
igtlStringMessage.h:31
igtlNewMacro
#define igtlNewMacro(x)
Definition:
igtlMacro.h:431
igtl::StringMessage::m_String
std::string m_String
The string.
Definition:
igtlStringMessage.h:77
igtlMath.h
igtl::StringMessage::Pointer
SmartPointer< Self > Pointer
Definition:
igtlStringMessage.h:36
igtl::StringMessage::m_Encoding
igtlUint16 m_Encoding
Definition:
igtlStringMessage.h:74
igtl::MessageBase
Definition:
igtlMessageBase.h:55
igtl
The "igtl" namespace contains all OpenIGTLink classes. There are several nested namespaces within the...
Definition:
igtlBindMessage.h:25
IGTLCommon_EXPORT
#define IGTLCommon_EXPORT
Definition:
igtlWin32Header.h:151
igtl::StringMessage::ConstPointer
SmartPointer< const Self > ConstPointer
Definition:
igtlStringMessage.h:37
igtl::SmartPointer< Self >
igtlTypeMacro
#define igtlTypeMacro(thisClass, superclass)
Definition:
igtlMacro.h:486
igtlObject.h
igtlTypes.h
Generated for OpenIGTLink by
Doxygen
1.8.17 written by
Dimitri van Heesch
, © 1997-2012