Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  
igtlCapabilityMessage.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: The OpenIGTLink Library
4 Language: C++
5
6 Copyright (c) Insight Software Consortium. All rights reserved.
7
8 This software is distributed WITHOUT ANY WARRANTY; without even
9 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
10 PURPOSE. See the above copyright notices for more information.
11
12=========================================================================*/
13
14#ifndef __igtlCapabilityMessage_h
15#define __igtlCapabilityMessage_h
16
17#include "igtlObject.h"
18#include "igtlMath.h"
19#include "igtlMessageBase.h"
20#include "igtlTypes.h"
21
22#include <vector>
23#include <string>
24
25namespace igtl
26{
27
29{
30
31public:
36
39
40public:
41 void SetTypes(std::vector<std::string> types);
42 int SetType(int id, const char* name);
43 const char* GetType(int id);
44
45 void SetNumberOfTypes(int n) { m_TypeNames.resize(n); }
46 int GetNumberOfTypes() { return m_TypeNames.size(); }
47 std::vector<std::string> GetTypes() { return m_TypeNames; }
48
49protected:
52
53protected:
54
56 virtual int PackContent();
57 virtual int UnpackContent();
58
59 std::vector<std::string> m_TypeNames;
60
61};
62
63
64} // namespace igtl
65
66#endif // __igtlCapabilityMessage_h
virtual int PackContent()
Packs (serialize) the content. Must be implemented in all child classes.
std::vector< std::string > GetTypes()
const char * GetType(int id)
virtual int UnpackContent()
Unpacks (deserialize) the content. Must be implemented in all child classes.
igtlTypeMacro(igtl::CapabilityMessage, igtl::MessageBase)
SmartPointer< const Self > ConstPointer
igtlNewMacro(igtl::CapabilityMessage)
void SetTypes(std::vector< std::string > types)
virtual int CalculateContentBufferSize()
Gets the size of the serialized content.
int SetType(int id, const char *name)
SmartPointer< Self > Pointer
std::vector< std::string > m_TypeNames
Implements transparent reference counting.
#define IGTLCommon_EXPORT
The "igtl" namespace contains all OpenIGTLink classes. There are several nested namespaces within the...

Generated for OpenIGTLink by Doxygen 1.9.8 written by Dimitri van Heesch, © 1997-2012