MeVisLab Toolbox Reference
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
27 class DataCompressor;
28
31
32 // -------------------------------------------------------------------
34 // -------------------------------------------------------------------
36 {
37 public:
38
39 //----------------------------------------------------------
40 //
41 //
43 //
44 //
45 //----------------------------------------------------------
46
59 static DataCompressor *createCompressor(const std::string &typeName,
60 MLErrorCode *errCode = nullptr);
61
68
75
80 static std::vector<CompressionRegisterEntry>::const_iterator findCompressorTypeConst(const std::string &typeName);
81
86 static std::vector<CompressionRegisterEntry>::const_iterator findCompressorTypeConst(const RuntimeType &rtType);
87
89 static const std::vector<CompressionRegisterEntry> &getRegisteredDataCompressors();
90
92 static std::vector<std::string> getRegisteredDataCompressorNames();
94
95 protected:
96
105
110 static std::vector<CompressionRegisterEntry>::iterator _findCompressorType(const std::string &typeName);
111
116 static std::vector<CompressionRegisterEntry>::iterator _findCompressorType(const RuntimeType &rtType);
117
118
120 static std::vector<CompressionRegisterEntry> _dataCompressorTypes;
121
124 };
125
127
128#endif // __mlDataCompressorFactory_H
129
130
#define MLDATA_COMPRESSOR_EXPORT
Global and OS specific declarations for the MLDataCompressor project.
Class representing general ML objects that support import/export via strings (setPersistentState() an...
Definition mlBase.h:59
Factory for ML data compression algorithms.
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 > _dataCompressorTypes
The list of RuntimeTypes of available DataCompressors.
static MLErrorCode unregisterCompressor(const RuntimeType &rtType)
Remove a registered data compressor.
static std::vector< CompressionRegisterEntry >::const_iterator findCompressorTypeConst(const RuntimeType &rtType)
Search a compressor with type name and return its corresponding registration entry.
static std::vector< std::string > getRegisteredDataCompressorNames()
Returns 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)
Search a compressor with type name and return its corresponding registration entry.
static std::vector< CompressionRegisterEntry >::const_iterator findCompressorTypeConst(const std::string &typeName)
Search a compressor with type name and return its corresponding registration entry.
static DataCompressor * _createCompressor(const RuntimeType *rtType, MLErrorCode &err)
Build a data compressor instance from a RumtimeType, 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:716
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.