MeVisLab Toolbox Reference
ml::ITKMLBaseWrapper< OBJ_TYPE, OBJ_TYPE_POINTER, WRAPPER_CLASS_NAME > Class Template Reference

Class to create a Base wrapper around an object of a certain template type. More...

#include <mlITKMLBaseWrapper.h>

Public Member Functions

 ITKMLBaseWrapper (const WrapperSuperStructPtrs &parentSuperStruct, ITKWrapperBase &realWrapper)
 Constructor.
 
virtual ~ITKMLBaseWrapper ()
 Destructor.
 
void addOutputBaseField (Module &module, const char *outputFieldName)
 Method to add a base field to the passed Module module.
 
void addInputBaseField (Module &module, const char *inputFieldName)
 Method to add a base field to the passed Module module.
 
void setNewOutputBaseFieldObject (OBJ_TYPE_POINTER newObject)
 Set base field so that it points to the new object.
 
BaseFieldgetOutputBaseField ()
 Return the pointer to the output base field or nullptr if not created.
 
BaseFieldgetInputBaseField ()
 Return the pointer to the input base field or nullptr if not created.
 
OBJ_TYPE_POINTER getWrappedOutputObject ()
 Return the pointer to the wrapped object.
 
bool hasSuperClass (const std::string &className) const
 Return true if the passed parent class name is in the list of classes.
 
OBJ_TYPE_POINTER getWrappedInputObject (const RuntimeType *=nullptr)
 

Protected Attributes

Base_realWrapper
 Reference to the real wrapper object creating this.
 
const WrapperSuperStructPtrs_wrapperSuperStructPtrs
 Reference to the inheritance pointer correlated to this class.
 
BaseField_outputBaseField
 Pointer to the field in _module which is used as output interface to another module; default is nullptr.
 
BaseField_inputBaseField
 Pointer to the field in _module which is used as input interface to another module; default is nullptr.
 
Module_module
 Pointer to the Module which shall handle this; default is nullptr.
 
OBJ_TYPE_POINTER _outputObj
 Smart pointer to the OBJ_TYPE created and wrapped by this class if an output connector is created.
 
OBJ_TYPE_POINTER _inputObj
 Smart pointer to the connected OBJ_TYPE wrapped by this class if an input connector is created or nullptr otherwise.
 
MLint _numAddOutputBaseFieldCalls
 Counter for the number of addOutputBaseField method calls.
 
MLint _numAddInputBaseFieldCalls
 Counter for the number of addInputBaseField method calls.
 

Detailed Description

template<class OBJ_TYPE, typename OBJ_TYPE_POINTER, typename WRAPPER_CLASS_NAME>
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.

Definition at line 60 of file mlITKMLBaseWrapper.h.

Constructor & Destructor Documentation

◆ ITKMLBaseWrapper()

Constructor.

Definition at line 67 of file mlITKMLBaseWrapper.h.

◆ ~ITKMLBaseWrapper()

Member Function Documentation

◆ addInputBaseField()

Method to add a base field to the passed Module module.

The value of the BaseField will be initialized to this. This method should be called only once.

Definition at line 118 of file mlITKMLBaseWrapper.h.

References ML_BAD_POINTER_OR_0, ML_BAD_STATE, ML_PRINT_ERROR, and mlrange_cast().

◆ addOutputBaseField()

Method to add a base field to the passed Module module.

The value of the BaseField will be initialized to this if createdObject is passed as true (the default). This method should be called only once, otherwise errors will be posted and the call will be ignored.

Definition at line 95 of file mlITKMLBaseWrapper.h.

References ML_BAD_POINTER_OR_0, ML_BAD_STATE, ML_PRINT_ERROR, and mlrange_cast().

◆ getInputBaseField()

Return the pointer to the input base field or nullptr if not created.

Definition at line 156 of file mlITKMLBaseWrapper.h.

◆ getOutputBaseField()

Return the pointer to the output base field or nullptr if not created.

Definition at line 148 of file mlITKMLBaseWrapper.h.

◆ getWrappedInputObject()

Return the pointer to the wrapped input object if it's of type of the

Runtime type, otherwise nullptr is returned. If rt is passed as nullptr

then for the Runtime Type of this is checked.

Definition at line 192 of file mlITKMLBaseWrapper.h.

References ML_BASE_IS_A, and mlrange_cast().

◆ getWrappedOutputObject()

Return the pointer to the wrapped object.

Definition at line 164 of file mlITKMLBaseWrapper.h.

◆ hasSuperClass()

Return true if the passed parent class name is in the list of classes.

Definition at line 172 of file mlITKMLBaseWrapper.h.

References mlrange_cast(), and ml::WrapperSuperStructPtrs::parentSuperStruct.

◆ setNewOutputBaseFieldObject()

Set base field so that it points to the new object.

Definition at line 139 of file mlITKMLBaseWrapper.h.

References mlrange_cast().

Member Data Documentation

◆ _inputBaseField

Pointer to the field in _module which is used as input interface to another module; default is nullptr.

Definition at line 236 of file mlITKMLBaseWrapper.h.

◆ _inputObj

Smart pointer to the connected OBJ_TYPE wrapped by this class if an input connector is created or nullptr otherwise.

Definition at line 247 of file mlITKMLBaseWrapper.h.

◆ _module

Pointer to the Module which shall handle this; default is nullptr.

Definition at line 239 of file mlITKMLBaseWrapper.h.

◆ _numAddInputBaseFieldCalls

Counter for the number of addInputBaseField method calls.

More than on call will be ignored and lead to an ML_ERROR. Default is 0.

Definition at line 255 of file mlITKMLBaseWrapper.h.

◆ _numAddOutputBaseFieldCalls

Counter for the number of addOutputBaseField method calls.

More than on call will be ignored and lead to an ML_ERROR. Default is 0.

Definition at line 251 of file mlITKMLBaseWrapper.h.

◆ _outputBaseField

Pointer to the field in _module which is used as output interface to another module; default is nullptr.

Definition at line 232 of file mlITKMLBaseWrapper.h.

◆ _outputObj

Smart pointer to the OBJ_TYPE created and wrapped by this class if an output connector is created.

Definition at line 243 of file mlITKMLBaseWrapper.h.

◆ _realWrapper

Reference to the real wrapper object creating this.

Definition at line 225 of file mlITKMLBaseWrapper.h.

◆ _wrapperSuperStructPtrs

Reference to the inheritance pointer correlated to this class.

Definition at line 228 of file mlITKMLBaseWrapper.h.


The documentation for this class was generated from the following file: