Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitkIGTLMessageCloneHandler.h
Go to the documentation of this file.
1 /*===================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 #ifndef MITKIGTLMESSAGECLONE_H_
18 #define MITKIGTLMESSAGECLONE_H_
19 
20 #include "itkObject.h"
21 #include "mitkCommon.h"
22 
23 #include "igtlObject.h"
24 #include "igtlMacro.h"
25 #include "igtlSocket.h"
26 #include "igtlMessageBase.h"
27 
28 #include "MitkOpenIGTLinkExports.h"
29 
30 namespace mitk
31 {
40  class MITKOPENIGTLINK_EXPORT IGTLMessageCloneHandler: public itk::Object
41  {
42  public:
44  itkFactorylessNewMacro(Self);
45  itkCloneMacro(Self);
46 
47  public:
48  virtual igtl::MessageBase::Pointer Clone(igtl::MessageBase*) { return nullptr; }
49 
50  protected:
53 };
54 
70 #define mitkIGTMessageCloneClassMacro(messagetype, classname) \
71  class classname : public ::mitk::IGTLMessageCloneHandler \
72  { \
73  public: \
74  mitkClassMacro(classname, mitk::IGTLMessageCloneHandler); \
75  itkFactorylessNewMacro(Self); \
76  itkCloneMacro(Self); \
77  public: \
78  virtual igtl::MessageBase::Pointer Clone(igtl::MessageBase*); \
79  protected: \
80  classname(){} \
81  ~classname() {} \
82  };
83 
84 
85 } // namespace mitk
86 
87 #endif // MITKIGTLMESSAGECLONE_H_
itk::SmartPointer< Self > Pointer
DataCollection - Class to facilitate loading/accessing structured data.
#define mitkClassMacroItkParent(className, SuperClassName)
Definition: mitkCommon.h:53
virtual igtl::MessageBase::Pointer Clone(igtl::MessageBase *)
Base class for clone handlers for igtl::MessageBase derived message types.