Medical Imaging Interaction Toolkit  2022.04.99-194dd5d8
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 (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #ifndef MITKIGTLMESSAGECLONE_H_
14 #define MITKIGTLMESSAGECLONE_H_
15 
16 #include "itkObject.h"
17 #include "mitkCommon.h"
18 
19 #include "igtlObject.h"
20 #include "igtlMacro.h"
21 #include "igtlSocket.h"
22 #include "igtlMessageBase.h"
23 
24 #include "MitkOpenIGTLinkExports.h"
25 
26 namespace mitk
27 {
37  {
38  public:
40  itkFactorylessNewMacro(Self);
41  itkCloneMacro(Self);
42 
43  public:
44  virtual igtl::MessageBase::Pointer Clone(igtl::MessageBase*) { return nullptr; }
45 
46  protected:
49 };
50 
66 #define mitkIGTMessageCloneClassMacro(messagetype, classname) \
67  class classname : public ::mitk::IGTLMessageCloneHandler \
68  { \
69  public: \
70  mitkClassMacro(classname, mitk::IGTLMessageCloneHandler); \
71  itkFactorylessNewMacro(Self); \
72  itkCloneMacro(Self); \
73  public: \
74  virtual igtl::MessageBase::Pointer Clone(igtl::MessageBase*); \
75  protected: \
76  classname(){} \
77  ~classname() {} \
78  };
79 
80 
81 } // namespace mitk
82 
83 #endif // MITKIGTLMESSAGECLONE_H_
DataCollection - Class to facilitate loading/accessing structured data.
#define MITKOPENIGTLINK_EXPORT
#define mitkClassMacroItkParent(className, SuperClassName)
Definition: mitkCommon.h:45
virtual igtl::MessageBase::Pointer Clone(igtl::MessageBase *)
Base class for clone handlers for igtl::MessageBase derived message types.