MeVisLab Toolbox Reference
Loading...
Searching...
No Matches
mlDataCompressorFactory.h
Go to the documentation of this file.
1/*************************************************************************************
2**
3** Copyright 2007, MeVis Medical Solutions AG
4**
5** The user may use this file in accordance with the license agreement provided with
6** the Software or, alternatively, in accordance with the terms contained in a
7** written agreement between the user and MeVis Medical Solutions AG.
8**
9** For further information use the contact form at https://www.mevislab.de/contact
10**
11**************************************************************************************/
12
13#ifndef ML_DATA_COMPRESSOR_FACTORY_H
14#define ML_DATA_COMPRESSOR_FACTORY_H
15
18
19// Resolve platform independencies.
21
22#include <mlBase.h>
23
25
27class DataCompressor;
28
31
32// -------------------------------------------------------------------
34// -------------------------------------------------------------------
36{
37public:
38 //----------------------------------------------------------
39 //
40 //
42 //
43 //
44 //----------------------------------------------------------
45
58 static DataCompressor* createCompressor(const std::string& typeName, MLErrorCode* errCode = nullptr);
59
66
73
78 static std::vector<CompressionRegisterEntry>::const_iterator findCompressorTypeConst(const std::string& typeName);
79
84 static std::vector<CompressionRegisterEntry>::const_iterator findCompressorTypeConst(const RuntimeType& rtType);
85
87 static const std::vector<CompressionRegisterEntry>& getRegisteredDataCompressors();
88
90 static std::vector<std::string> getRegisteredDataCompressorNames();
92
93protected:
101
106 static std::vector<CompressionRegisterEntry>::iterator _findCompressorType(const std::string& typeName);
107
112 static std::vector<CompressionRegisterEntry>::iterator _findCompressorType(const RuntimeType& rtType);
113
114
116 static std::vector<CompressionRegisterEntry> _dataCompressorTypes;
117
120};
121
123
124#endif // __mlDataCompressorFactory_H
#define MLDATA_COMPRESSOR_EXPORT
Class representing general ML objects that support import/export via strings (setPersistentState() an...
Definition mlBase.h:63
Factory for ML data compression algorithms.
static std::vector< CompressionRegisterEntry >::iterator _findCompressorType(const std::string &typeName)
Searches a compressor with type name and return its corresponding registration entry.
static std::vector< CompressionRegisterEntry > _dataCompressorTypes
The list of runtime types of available DataCompressors.
static MLErrorCode unregisterCompressor(const RuntimeType &rtType)
Removes a registered data compressor.
static std::vector< CompressionRegisterEntry >::const_iterator findCompressorTypeConst(const RuntimeType &rtType)
Searches a compressor with type name and returns its corresponding registration entry.
static std::vector< std::string > getRegisteredDataCompressorNames()
Returns a list of all names of currently registered DataCompressors.
static const std::vector< CompressionRegisterEntry > & getRegisteredDataCompressors()
Provides constant access to the list of available DataCompressors.
static DataCompressor * createCompressor(const std::string &typeName, MLErrorCode *errCode=nullptr)
Factory and registration support for data compressors.
static MLErrorCode registerCompressor(const RuntimeType *rtType)
Registers a data compressor.
static std::vector< CompressionRegisterEntry >::iterator _findCompressorType(const RuntimeType &rtType)
Searches a compressor with type name and return its corresponding registration entry.
static std::vector< CompressionRegisterEntry >::const_iterator findCompressorTypeConst(const std::string &typeName)
Searches a compressor with type name and returns its corresponding registration entry.
static DataCompressor * _createCompressor(const RuntimeType *rtType, MLErrorCode &err)
Builds a data compressor instance from a runtime type, even if it is not registered.
Abstract base class for ML data compression algorithms.
RuntimeType contains type and inheritance information of a class and a static dictionary with informa...
MLint32 MLErrorCode
Type of an ML Error code.
Definition mlTypeDefs.h:772
Target mlrange_cast(Source arg)
Generic version of checked ML casts.
#define ML_CLASS_HEADER(className)
Same like ML_CLASS_HEADER_EXPORTED with a non-existing export symbol.