MeVisLabToolboxReference
MeVis/Foundation/Sources/MLDataCompressors/MLDataCompressor/mlDataCompressorFactory.h
Go to the documentation of this file.
00001 // **InsertLicense** code
00002 //----------------------------------------------------------------------------------
00005 
00010 // Factory class for ML data compression algorithms.
00011 //----------------------------------------------------------------------------------
00012 
00013 #ifndef __mlDataCompressorFactory_H
00014 #define __mlDataCompressorFactory_H
00015 
00016 // Resolve platform independencies.
00017 #ifndef __MLDataCompressorSystem_H
00018 #include "MLDataCompressorSystem.h"
00019 #endif
00020 
00021 #ifndef __mlUtils_H
00022 #include "mlUtils.h"
00023 #endif
00024 #ifndef __mlBase_H
00025 #include "mlBase.h"
00026 #endif
00027 
00028 ML_UTILS_START_NAMESPACE
00029 
00031   class DataCompressor;
00032 
00034   class CompressionRegisterEntry;
00035 
00036   // -------------------------------------------------------------------
00038   // -------------------------------------------------------------------
00039   class MLDATA_COMPRESSOR_EXPORT DataCompressorFactory : public Base 
00040   {
00041   public:
00042 
00043     //----------------------------------------------------------
00044     //
00045     //
00047     //
00048     //
00049     //----------------------------------------------------------
00050 
00063     static DataCompressor                                        *createCompressor(const std::string &typeName, 
00064                                                                                    MLErrorCode       *errCode = NULL);
00065 
00071     static MLErrorCode                                            registerCompressor(const RuntimeType *rtType);
00072 
00078     static MLErrorCode                                            unregisterCompressor(const RuntimeType &rtType);
00079 
00084     static std::vector<CompressionRegisterEntry>::const_iterator  findCompressorTypeConst(const std::string &typeName);
00085 
00090     static std::vector<CompressionRegisterEntry>::const_iterator  findCompressorTypeConst(const RuntimeType &rtType);
00091 
00093     static const std::vector<CompressionRegisterEntry>           &getRegisteredDataCompressors();
00094 
00096     static std::vector<std::string>                               getRegisteredDataCompressorNames();
00098 
00099   protected:
00100 
00107     static DataCompressor                                 *_createCompressor(const RuntimeType *rtType,
00108                                                                              MLErrorCode &err);
00109 
00114     static std::vector<CompressionRegisterEntry>::iterator _findCompressorType(const std::string &typeName);
00115 
00120     static std::vector<CompressionRegisterEntry>::iterator _findCompressorType(const RuntimeType &rtType);
00121 
00122 
00124     static std::vector<CompressionRegisterEntry> _dataCompressorTypes;
00125 
00127     ML_CLASS_HEADER(DataCompressorFactory)
00128   };
00129 
00130 ML_UTILS_END_NAMESPACE
00131 
00132 #endif // __mlDataCompressorFactory_H
00133 
00134