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. More...
 
typedef void(* MLITKObjectFactoryDestructor) (void *, MLDataType dataType, unsigned int dim)
 Function type to destroy an object. More...
 

Public Member Functions

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

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.

◆ 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().

◆ createObject() [2/2]

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

Create object.

Definition at line 144 of file mlITKObjectFactory.h.

◆ destroyObject()

void ml::MLITKObjectFactory::destroyObject ( )
inline

Destroy object.

Definition at line 150 of file mlITKObjectFactory.h.

◆ getDataType()

MLDataType ml::MLITKObjectFactory::getDataType ( void  ) 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: