MeVisLab Toolbox Reference
ml::MLITKObjectFactory Class Reference

A class to manage a void pointer to an object of a certain class type a type dataType and dimension dim. More...

#include <mlITKObjectFactory.h>

Public Types

typedef void *(* MLITKObjectFactoryCreator) (MLDataType dataType, unsigned int dim)
 Function type to cerate an object and to return a void pointer to it.
 
typedef void(* MLITKObjectFactoryDestructor) (void *, MLDataType dataType, unsigned int dim)
 Function type to destroy an object.
 

Public Member Functions

 MLITKObjectFactory ()
 Create an empty object.
 
 ~MLITKObjectFactory ()
 Destroy internally stored object.
 
void createObject (MLDataType dType, int dim)
 Create object.
 
void createObject (MLDataType dType, ImageVector v)
 Create object.
 
void destroyObject ()
 Destroy object.
 
voidgetObject () const
 Returns void pointer to the managed internal object.
 
MLDataType getDataType () const
 Returns data type of the managed internal object.
 
unsigned int getDimension () const
 Returns dimension of the managed internal object.
 
void _setCreatorAndDestructor (MLITKObjectFactoryCreator cFunc, MLITKObjectFactoryDestructor dFunc)
 Sets creator and destructor functions. Only to be called by the macro.
 

Detailed Description

A class to manage a void pointer to an object of a certain class type a type dataType and dimension dim.

Using an instance of this class requires also the usage of the macros MLITKImplementFactoryFuncs and MLITKObjectFactoryInit.

Definition at line 127 of file mlITKObjectFactory.h.

Member Typedef Documentation

◆ MLITKObjectFactoryCreator

typedef void *(* ml::MLITKObjectFactory::MLITKObjectFactoryCreator) (MLDataType dataType, unsigned int dim)

Function type to cerate an object and to return a void pointer to it.

Definition at line 132 of file mlITKObjectFactory.h.

◆ MLITKObjectFactoryDestructor

typedef void(* ml::MLITKObjectFactory::MLITKObjectFactoryDestructor) (void *, MLDataType dataType, unsigned int dim)

Function type to destroy an object.

Definition at line 135 of file mlITKObjectFactory.h.

Constructor & Destructor Documentation

◆ MLITKObjectFactory()

ml::MLITKObjectFactory::MLITKObjectFactory ( )
inline

Create an empty object.

Definition at line 138 of file mlITKObjectFactory.h.

◆ ~MLITKObjectFactory()

ml::MLITKObjectFactory::~MLITKObjectFactory ( )
inline

Destroy internally stored object.

Definition at line 141 of file mlITKObjectFactory.h.

Member Function Documentation

◆ _setCreatorAndDestructor()

void ml::MLITKObjectFactory::_setCreatorAndDestructor ( MLITKObjectFactoryCreator cFunc,
MLITKObjectFactoryDestructor dFunc )
inline

Sets creator and destructor functions. Only to be called by the macro.

Definition at line 162 of file mlITKObjectFactory.h.

References mlrange_cast().

◆ createObject() [1/2]

void ml::MLITKObjectFactory::createObject ( MLDataType dType,
ImageVector v )
inline

Create object.

Definition at line 147 of file mlITKObjectFactory.h.

References ml::TVector< TVectorBase >::getExtDimension(), and mlrange_cast().

◆ createObject() [2/2]

void ml::MLITKObjectFactory::createObject ( MLDataType dType,
int dim )
inline

Create object.

Definition at line 144 of file mlITKObjectFactory.h.

References mlrange_cast().

◆ destroyObject()

void ml::MLITKObjectFactory::destroyObject ( )
inline

Destroy object.

Definition at line 150 of file mlITKObjectFactory.h.

◆ getDataType()

MLDataType ml::MLITKObjectFactory::getDataType ( ) const
inline

Returns data type of the managed internal object.

Definition at line 156 of file mlITKObjectFactory.h.

◆ getDimension()

unsigned int ml::MLITKObjectFactory::getDimension ( ) const
inline

Returns dimension of the managed internal object.

Definition at line 159 of file mlITKObjectFactory.h.

◆ getObject()

void * ml::MLITKObjectFactory::getObject ( ) const
inline

Returns void pointer to the managed internal object.

Definition at line 153 of file mlITKObjectFactory.h.


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