MeVisLab Toolbox Reference
mlVTKMLBaseWrapper.h File Reference

Go to the source code of this file.

Classes

class  ml::VTKWrapperBase
 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::VTKMLBaseWrapper< OBJ_TYPE, OBJ_TYPE_POINTER, WRAPPER_CLASS_NAME >
 Class to create a Base wrapper around an object of a certain template type. More...
 

Namespaces

 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. More...
 
#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. More...
 

Macro Definition Documentation

◆ ML_CREATE_BASE_WRAPPER_FOR_OBJECT_CPP

#define ML_CREATE_BASE_WRAPPER_FOR_OBJECT_CPP (   CLASS_NAME,
  CLASS_NAME_POINTER,
  WRAPPER_CLASS_NAME,
  PARENT_CLASS_NAME,
  ML_EXPORT_MACRO 
)
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 VTKMLBaseWrapper<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<VTKMLBaseWrapper<CLASS_NAME, CLASS_NAME_POINTER, WRAPPER_CLASS_NAME>*>(_obj)); _obj = NULL; }; } \
\
/* For documentation of the following methods see VTKMLBaseWrapper. */ \
void WRAPPER_CLASS_NAME::addOutputBaseField(Module &module, const char *outputFieldName){ (static_cast<VTKMLBaseWrapper<CLASS_NAME, CLASS_NAME_POINTER, WRAPPER_CLASS_NAME>*>(_obj))->addOutputBaseField(module, outputFieldName); } \
void WRAPPER_CLASS_NAME::addInputBaseField(Module &module, const char *inputFieldName) { (static_cast<VTKMLBaseWrapper<CLASS_NAME, CLASS_NAME_POINTER, WRAPPER_CLASS_NAME>*>(_obj))->addInputBaseField(module, inputFieldName) ; } \
void WRAPPER_CLASS_NAME::setNewOutputBaseFieldObject(CLASS_NAME_POINTER newObject) { (static_cast<VTKMLBaseWrapper<CLASS_NAME, CLASS_NAME_POINTER, WRAPPER_CLASS_NAME>*>(_obj))->setNewOutputBaseFieldObject(newObject) ; } \
BaseField *WRAPPER_CLASS_NAME::getOutputBaseField() { return (static_cast<VTKMLBaseWrapper<CLASS_NAME, CLASS_NAME_POINTER, WRAPPER_CLASS_NAME>*>(_obj))->getOutputBaseField() ; } \
BaseField *WRAPPER_CLASS_NAME::getInputBaseField() { return (static_cast<VTKMLBaseWrapper<CLASS_NAME, CLASS_NAME_POINTER, WRAPPER_CLASS_NAME>*>(_obj))->getInputBaseField() ; } \
CLASS_NAME_POINTER WRAPPER_CLASS_NAME::getWrappedOutputObject() { return (static_cast<VTKMLBaseWrapper<CLASS_NAME, CLASS_NAME_POINTER, WRAPPER_CLASS_NAME>*>(_obj))->getWrappedOutputObject() ; } \
CLASS_NAME_POINTER WRAPPER_CLASS_NAME::getWrappedInputObject(const RuntimeType *rt) { return (static_cast<VTKMLBaseWrapper<CLASS_NAME, CLASS_NAME_POINTER, WRAPPER_CLASS_NAME>*>(_obj))->getWrappedInputObject(rt) ; } \
bool WRAPPER_CLASS_NAME::hasSuperClass(const std::string &className) const { return (static_cast<VTKMLBaseWrapper<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. */ \
ML_CLASS_SOURCE(WRAPPER_CLASS_NAME, VTKWrapperBase); \
\

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 323 of file mlVTKMLBaseWrapper.h.

◆ ML_CREATE_BASE_WRAPPER_FOR_OBJECT_H

#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.

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 261 of file mlVTKMLBaseWrapper.h.