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
Module: $HeadURL: http://svn.na-mic.org/NAMICSandBox/trunk/OpenIGTLink2_beta/Source/igtlStringMessage.h $
5
Language: C++
6
Date: $Date: 2009-12-16 23:58:02 -0500 (Wed, 16 Dec 2009) $
7
Version: $Revision: 5466 $
8
9
Copyright (c) Insight Software Consortium. All rights reserved.
10
11
This software is distributed WITHOUT ANY WARRANTY; without even
12
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
13
PURPOSE. See the above copyright notices for more information.
14
15
=========================================================================*/
16
17
#ifndef __igtlStringMessage_h
18
#define __igtlStringMessage_h
19
20
#include <string>
21
22
#include "
igtlObject.h
"
23
#include "
igtlMath.h
"
24
#include "
igtlMessageBase.h
"
25
#include "
igtlTypes.h
"
26
27
#define IGTL_STRING_MESSAGE_DEFAULT_ENCODING 3
/* Default encoding -- ANSI-X3.5-1968 */
28
29
namespace
igtl
30
{
31
32
class
IGTLCommon_EXPORT
StringMessage
:
public
MessageBase
33
{
34
public
:
35
typedef
StringMessage
Self
;
36
typedef
MessageBase
Superclass
;
37
typedef
SmartPointer<Self>
Pointer
;
38
typedef
SmartPointer<const Self>
ConstPointer
;
39
40
igtlTypeMacro
(
igtl::StringMessage
,
igtl::MessageBase
);
41
igtlNewMacro
(
igtl::StringMessage
);
42
43
public
:
44
45
int
SetString(
const
char
*
string
);
46
int
SetString(std::string &
string
);
47
int
SetEncoding(igtlUint16 enc);
48
49
const
char
* GetString();
50
igtlUint16 GetEncoding();
51
52
protected
:
53
StringMessage
();
54
~
StringMessage
();
55
56
protected
:
57
58
virtual
int
GetBodyPackSize();
59
virtual
int
PackBody();
60
virtual
int
UnpackBody();
61
62
igtlUint16
m_Encoding
;
63
64
//BTX
65
std::string
m_String
;
66
//ETX
67
68
};
69
70
71
}
// namespace igtl
72
73
#endif // _igtlStringMessage_h
74
75
76
77
Generated at Thu Mar 20 2014 16:32:06 for OpenIGTLink by
1.8.1.2 written by
Dimitri van Heesch
, © 1997-2000