client/compressor.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef EQ_COMPRESSOR_H
00020 #define EQ_COMPRESSOR_H
00021
00022 #include <eq/plugins/compressor.h>
00023 #include <eq/client/types.h>
00024 #include <eq/base/dso.h>
00025
00031 namespace eq
00032 {
00037 class Compressor
00038 {
00039 public:
00040 typedef size_t ( *GetNumCompressors_t ) ();
00041 typedef void ( *GetInfo_t ) ( const size_t, EqCompressorInfo* const );
00042 typedef void* ( *NewCompressor_t ) ( const unsigned );
00043 typedef void ( *DeleteCompressor_t ) ( void* const );
00044 typedef void* ( *NewDecompressor_t ) ( const unsigned );
00045 typedef void ( *DeleteDecompressor_t ) ( void* const );
00046 typedef void ( *Compress_t ) ( void* const, const unsigned,
00047 void* const, const uint64_t*,
00048 const uint64_t );
00049 typedef size_t ( *GetNumResults_t ) ( void* const, const unsigned );
00050 typedef void ( *GetResult_t ) ( void* const, const unsigned,
00051 const unsigned, void** const,
00052 uint64_t* const );
00053 typedef void ( *Decompress_t ) ( void* const, const unsigned,
00054 const void* const*,
00055 const uint64_t* const,
00056 const unsigned, void* const,
00057 uint64_t* const,
00058 const uint64_t );
00059
00060 Compressor(){}
00061
00063 bool init( const std::string& libraryName );
00064
00066 void exit();
00067
00069 NewCompressor_t newCompressor;
00070
00072 NewDecompressor_t newDecompressor;
00073
00075 DeleteCompressor_t deleteCompressor;
00076
00078 DeleteDecompressor_t deleteDecompressor;
00079
00081 Compress_t compress;
00082
00084 Decompress_t decompress;
00085
00087 GetNumResults_t getNumResults;
00088
00090 GetNumCompressors_t getNumCompressors;
00091
00093 GetResult_t getResult;
00094
00096 bool implementsType( const uint32_t name );
00097
00099 const CompressorInfoVector& getInfos() const { return _infos; }
00100
00101 private:
00102 CompressorInfoVector _infos;
00103 base::DSO _dso;
00104 };
00105
00106 EQ_EXPORT std::ostream& operator << ( std::ostream&,
00107 const EqCompressorInfo& );
00108 }
00109
00110 #endif //EQ_COMPRESSOR_H