MeVisLab Toolbox Reference
mlITKMLBaseWrapper.h File Reference

Go to the source code of this file.

Classes

class  ml::ITKWrapperBase
 Helper class to have a common base class for all derived wrapper. More...
 
class  ml::WrapperSuperStructPtrs
 Link structure between names and superclass names. More...
 
class  ml::ITKMLBaseWrapper< OBJ_TYPE, OBJ_TYPE_POINTER, WRAPPER_CLASS_NAME >
 Class to create a Base wrapper around an object of a certain template type. More...
 

Namespaces

namespace  ml
 Main documentation file for ML users and developers.
 

Macros

#define ML_CREATE_BASE_WRAPPER_FOR_OBJECT_H(CLASS_NAME, CLASS_NAME_POINTER, WRAPPER_CLASS_NAME, PARENT_CLASS_NAME, ML_EXPORT_MACRO)
 Macro to create a wrapper class for an object.
 
#define ML_CREATE_BASE_WRAPPER_FOR_OBJECT_CPP(CLASS_NAME, CLASS_NAME_POINTER, WRAPPER_CLASS_NAME, PARENT_CLASS_NAME, ML_EXPORT_MACRO)
 Macro to create a wrapper class for an object.
 

Macro Definition Documentation

◆ ML_CREATE_BASE_WRAPPER_FOR_OBJECT_CPP

Value:
\
/* Pointer to the string names wrapped class and parent class. */\
const std::string WRAPPER_CLASS_NAME::NameStrings[2] = { #CLASS_NAME, #PARENT_CLASS_NAME }; \
\
/* Reference the NameStrings for this class and for the parent class. */\
const WrapperSuperStructPtrs WRAPPER_CLASS_NAME::_wrapperSuperStructPtrs(WRAPPER_CLASS_NAME::NameStrings, &PARENT_CLASS_NAME##Wrapper::_wrapperSuperStructPtrs); \
\
/* Implement a constructor and call of superclass constructor. */ \
WRAPPER_CLASS_NAME::WRAPPER_CLASS_NAME(){ _obj = static_cast<void*>(new ITKMLBaseWrapper<CLASS_NAME, CLASS_NAME_POINTER, WRAPPER_CLASS_NAME>(WRAPPER_CLASS_NAME::_wrapperSuperStructPtrs, *this)); } \
\
/* Destructor. */ \
WRAPPER_CLASS_NAME::~WRAPPER_CLASS_NAME(){ if (_obj){ delete (static_cast<ITKMLBaseWrapper<CLASS_NAME, CLASS_NAME_POINTER, WRAPPER_CLASS_NAME>*>(_obj)); _obj = nullptr; }; } \
\
/* For documentation of the following methods see ITKMLBaseWrapper. */ \
void WRAPPER_CLASS_NAME::addOutputBaseField(Module &module, const char *outputFieldName){ (static_cast<ITKMLBaseWrapper<CLASS_NAME, CLASS_NAME_POINTER, WRAPPER_CLASS_NAME>*>(_obj))->addOutputBaseField(module, outputFieldName); } \
void WRAPPER_CLASS_NAME::addInputBaseField(Module &module, const char *inputFieldName) { (static_cast<ITKMLBaseWrapper<CLASS_NAME, CLASS_NAME_POINTER, WRAPPER_CLASS_NAME>*>(_obj))->addInputBaseField(module, inputFieldName) ; } \
void WRAPPER_CLASS_NAME::setNewOutputBaseFieldObject(CLASS_NAME_POINTER newObject) { (static_cast<ITKMLBaseWrapper<CLASS_NAME, CLASS_NAME_POINTER, WRAPPER_CLASS_NAME>*>(_obj))->setNewOutputBaseFieldObject(newObject) ; } \
BaseField *WRAPPER_CLASS_NAME::getOutputBaseField() { return (static_cast<ITKMLBaseWrapper<CLASS_NAME, CLASS_NAME_POINTER, WRAPPER_CLASS_NAME>*>(_obj))->getOutputBaseField() ; } \
BaseField *WRAPPER_CLASS_NAME::getInputBaseField() { return (static_cast<ITKMLBaseWrapper<CLASS_NAME, CLASS_NAME_POINTER, WRAPPER_CLASS_NAME>*>(_obj))->getInputBaseField() ; } \
CLASS_NAME_POINTER WRAPPER_CLASS_NAME::getWrappedOutputObject() { return (static_cast<ITKMLBaseWrapper<CLASS_NAME, CLASS_NAME_POINTER, WRAPPER_CLASS_NAME>*>(_obj))->getWrappedOutputObject() ; } \
CLASS_NAME_POINTER WRAPPER_CLASS_NAME::getWrappedInputObject(const RuntimeType *rt) { return (static_cast<ITKMLBaseWrapper<CLASS_NAME, CLASS_NAME_POINTER, WRAPPER_CLASS_NAME>*>(_obj))->getWrappedInputObject(rt) ; } \
bool WRAPPER_CLASS_NAME::hasSuperClass(const std::string &className) const { return (static_cast<ITKMLBaseWrapper<CLASS_NAME, CLASS_NAME_POINTER, WRAPPER_CLASS_NAME>*>(_obj))->hasSuperClass(className) ; } \
\
const std::string & WRAPPER_CLASS_NAME::getName() { return NameStrings[0]; }\
\
/* The .cpp part of the runtime type system interface. */ \
\
Target mlrange_cast(Source arg)
Generic version of checked ML casts.

Macro to create a wrapper class for an object.

Requires the usage of ML_CREATE_BASE_WRAPPER_FOR_OBJECT_H in corresponding .h file and the initialization of CLASS_NAME in the .dll-init file.

Definition at line 317 of file mlITKMLBaseWrapper.h.

◆ ML_CREATE_BASE_WRAPPER_FOR_OBJECT_H

Macro to create a wrapper class for an object.

Requires the usage of ML_CREATE_BASE_WRAPPER_FOR_OBJECT_CPP in corresponding .h file and the initialization of CLASS_NAME in the .dll-init file.

Definition at line 265 of file mlITKMLBaseWrapper.h.