MITK-IGT
IGT Extension of MITK
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
mitkIGTLMessageCloneHandler.h File Reference
#include "itkObject.h"
#include "mitkCommon.h"
#include "igtlObject.h"
#include "igtlMacro.h"
#include "igtlSocket.h"
#include "igtlMessageBase.h"
#include "MitkOpenIGTLinkExports.h"

Go to the source code of this file.

Classes

class  mitk::IGTLMessageCloneHandler
 Base class for clone handlers for igtl::MessageBase derived message types. More...
 

Namespaces

namespace  mitk
 IGT Exceptions.
 

Macros

#define mitkIGTMessageCloneClassMacro(messagetype, classname)
 

Macro Definition Documentation

◆ mitkIGTMessageCloneClassMacro

#define mitkIGTMessageCloneClassMacro ( messagetype,
classname )
Value:
class classname : public ::mitk::IGTLMessageCloneHandler \
{ \
public: \
mitkClassMacro(classname, mitk::IGTLMessageCloneHandler); \
itkFactorylessNewMacro(Self); \
itkCloneMacro(Self); \
public: \
virtual igtl::MessageBase::Pointer Clone(igtl::MessageBase*); \
protected: \
classname(){} \
~classname() {} \
};
Base class for clone handlers for igtl::MessageBase derived message types.
virtual igtl::MessageBase::Pointer Clone(igtl::MessageBase *)

Description: The mitkIGTMessageCloneClassMacro() macro is to help developers to define message clone handler classes. It generates a chlid class of mitk::IGTLMessageCloneHandler. The developer only needs to implement Clone() after calling this macro. The following code shows how to define a handler that processes IMAGE message:

mitkIGTMessageCloneClassMacro(igtl::ImageMessage, TestImageMessageHandler); igtl::MessageBase::Pointer TestImageMessageHandler::Clone(igtl::MessageBase * message) { // do something }

Definition at line 66 of file mitkIGTLMessageCloneHandler.h.