Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  
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 
32 {
33 public:
38 
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 
SmartPointer< const Self > ConstPointer
#define igtlTypeMacro(thisClass, superclass)
Definition: igtlMacro.h:486
The "igtl" namespace contains all OpenIGTLink classes. There are several nested namespaces within the...
#define IGTLCommon_EXPORT
std::string m_String
The string.
SmartPointer< Self > Pointer
THe STRING message type is used for transferring a character string. It supports character strings up...
#define igtlNewMacro(x)
Definition: igtlMacro.h:431

Generated at Tue Nov 3 2015 19:17:46 for OpenIGTLink by doxygen 1.8.9.1 written by Dimitri van Heesch, © 1997-2012