Factory for ML data compression algorithms.
More...
#include <mlDataCompressorFactory.h>
Factory for ML data compression algorithms.
Definition at line 35 of file mlDataCompressorFactory.h.
◆ _createCompressor()
Builds a data compressor instance from a runtime type, even if it is not registered.
- Parameters
-
rtType | Must be the valid runtime type of the class to be registered. The compressor class must be derived from DataCompressor. |
err | Returns ML_RESULT_OK in case of success; otherwise, it returns a code describing the problem. |
- Returns
- A pointer to an instance of the compressor or NULL in error cases.
◆ _findCompressorType() [1/2]
Searches a compressor with type name and return its corresponding registration entry.
- Parameters
-
rtType | 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.
◆ _findCompressorType() [2/2]
Searches a compressor with type name and return its corresponding registration entry.
- Parameters
-
typeName | 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.
◆ createCompressor()
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
. For an empty typeName string, NULL is always returned.
- Parameters
-
typeName | The registered name of the compressor type to be created. |
errCode | Will 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.
◆ findCompressorTypeConst() [1/2]
Searches a compressor with type name and returns its corresponding registration entry.
- Parameters
-
rtType | 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.
◆ findCompressorTypeConst() [2/2]
Searches a compressor with type name and returns its corresponding registration entry.
- Parameters
-
typeName | 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.
◆ getRegisteredDataCompressorNames()
static std::vector< std::string > ml::DataCompressorFactory::getRegisteredDataCompressorNames |
( |
| ) |
|
|
static |
Returns a list of all names of currently registered DataCompressors.
◆ getRegisteredDataCompressors()
Provides constant access to the list of available DataCompressors.
◆ registerCompressor()
Registers a data compressor.
- Parameters
-
- Returns
- ML_RESULT_OK in case of success or a code describing the nature of the error.
◆ unregisterCompressor()
Removes a registered data compressor.
- Parameters
-
rtType | The runtime type of the class to be unregistered. |
- Returns
- ML_RESULT_OK on successful unregistration of the compressor type or an MLErrorCode describing the problem.
◆ _dataCompressorTypes
The documentation for this class was generated from the following file: