MeVisLabToolboxReference
ml::DataCompressorFactory Class Reference

Factory for ML data compression algorithms. More...

#include <mlDataCompressorFactory.h>

Inheritance diagram for ml::DataCompressorFactory:
ml::Base

List of all members.

Static Public Member Functions

static DataCompressorcreateCompressor (const std::string &typeName, MLErrorCode *errCode=NULL)
 Factory and registration support for data compressors.
static MLErrorCode registerCompressor (const RuntimeType *rtType)
 Registers a data compressor.
static MLErrorCode unregisterCompressor (const RuntimeType &rtType)
 Remove a registered data compressor.
static std::vector
< CompressionRegisterEntry >
::const_iterator 
findCompressorTypeConst (const std::string &typeName)
 Search a compressor with type name and return its corresponding registration entry.
static std::vector
< CompressionRegisterEntry >
::const_iterator 
findCompressorTypeConst (const RuntimeType &rtType)
 Search a compressor with type name and return its corresponding registration entry.
static const std::vector
< CompressionRegisterEntry > & 
getRegisteredDataCompressors ()
 Provides constant access to the list of available DataCompressors.
static std::vector< std::string > getRegisteredDataCompressorNames ()
 Returns list of all names of currently registered DataCompressors.

Static Protected Member Functions

static DataCompressor_createCompressor (const RuntimeType *rtType, MLErrorCode &err)
 Build a data compressor instance from a RumtimeType, even if it is not registered.
static std::vector
< CompressionRegisterEntry >
::iterator 
_findCompressorType (const std::string &typeName)
 Search a compressor with type name and return its corresponding registration entry.
static std::vector
< CompressionRegisterEntry >
::iterator 
_findCompressorType (const RuntimeType &rtType)
 Search a compressor with type name and return its corresponding registration entry.

Static Protected Attributes

static std::vector
< CompressionRegisterEntry > 
_dataCompressorTypes
 The list of RuntimeTypes of available DataCompressors.

Detailed Description

Factory for ML data compression algorithms.

Definition at line 39 of file mlDataCompressorFactory.h.


Member Function Documentation

static DataCompressor* ml::DataCompressorFactory::_createCompressor ( const RuntimeType rtType,
MLErrorCode err 
) [static, protected]

Build a data compressor instance from a RumtimeType, even if it is not registered.

Parameters:
rtTypemust be the valid RuntimeType of the class to be registered The compressor class must be derived from DataCompressor.
errreturns ML_RESULT_OK in case of success, otherwise a code describing the problem.
Returns:
A pointer to an instance of the compressor or NULL in error cases.
static std::vector<CompressionRegisterEntry>::iterator ml::DataCompressorFactory::_findCompressorType ( const std::string &  typeName) [static, protected]

Search a compressor with type name and return its corresponding registration entry.

Parameters:
typeNameis the name of the of the compressor class to find.
Returns:
An iterator to the instance of the registered data compressor or _dataCompressorTypes.end() on failure.
static std::vector<CompressionRegisterEntry>::iterator ml::DataCompressorFactory::_findCompressorType ( const RuntimeType rtType) [static, protected]

Search a compressor with type name and return its corresponding registration entry.

Parameters:
rtTypeis the Runtime type of the compressor class to find.
Returns:
An iterator to the instance of the registered data compressor or _dataCompressorTypes.end() on failure.
static DataCompressor* ml::DataCompressorFactory::createCompressor ( const std::string &  typeName,
MLErrorCode errCode = NULL 
) [static]

Factory and registration support for data compressors.

Creates a compressor of a given type or NULL on failure, for example if the type does not exist. The created instance must be deleted with delete. On an empty typeName string always NULL is returned.

Parameters:
typeNameis the registered name of the compressor type to be created.
errCodewill be ignored if NULL (the default). If non NULL it will return ML_RESULT_OK in case of success or another error code to describe the reason for the failure.
Returns:
A pointer to a new instance of the registered data compressor or NULL on failure.
static std::vector<CompressionRegisterEntry>::const_iterator ml::DataCompressorFactory::findCompressorTypeConst ( const std::string &  typeName) [static]

Search a compressor with type name and return its corresponding registration entry.

Parameters:
typeNameis the name of the of the compressor class to find.
Returns:
A constant iterator to the instance of the registered data compressor or _dataCompressorTypes.end() on failure.
static std::vector<CompressionRegisterEntry>::const_iterator ml::DataCompressorFactory::findCompressorTypeConst ( const RuntimeType rtType) [static]

Search a compressor with type name and return its corresponding registration entry.

Parameters:
rtTypeis the Runtime type of the compressor class to find.
Returns:
A constant iterator to the instance of the registered data compressor or _dataCompressorTypes.end() on failure.
static std::vector<std::string> ml::DataCompressorFactory::getRegisteredDataCompressorNames ( ) [static]

Returns list of all names of currently registered DataCompressors.

static const std::vector<CompressionRegisterEntry>& ml::DataCompressorFactory::getRegisteredDataCompressors ( ) [static]

Provides constant access to the list of available DataCompressors.

static MLErrorCode ml::DataCompressorFactory::registerCompressor ( const RuntimeType rtType) [static]

Registers a data compressor.

Parameters:
rtTypemust be the valid RuntimeType of the class to be registered The compressor class must be derived from DataCompressor.
Returns:
ML_RESULT_OK in case of success or a code describing the nature of the error.
static MLErrorCode ml::DataCompressorFactory::unregisterCompressor ( const RuntimeType rtType) [static]

Remove a registered data compressor.

Parameters:
rtTypeis the RuntimeType of the class to be unregistered.
Returns:
ML_RESULT_OK on successful unregistration of the compressor type or an MLErrorCode describing the problem.

Member Data Documentation

std::vector<CompressionRegisterEntry> ml::DataCompressorFactory::_dataCompressorTypes [static, protected]

The list of RuntimeTypes of available DataCompressors.

Definition at line 124 of file mlDataCompressorFactory.h.


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