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 {
00036 class Compressor
00037 {
00038 public:
00039 typedef size_t ( *GetNumCompressors_t ) ();
00040 typedef void ( *GetInfo_t ) ( const size_t, EqCompressorInfo* const );
00041 typedef void* ( *NewCompressor_t ) ( const unsigned );
00042 typedef void ( *DeleteCompressor_t ) ( void* const );
00043 typedef void* ( *NewDecompressor_t ) ( const unsigned );
00044 typedef void ( *DeleteDecompressor_t ) ( void* const );
00045 typedef void ( *Compress_t ) ( void* const, const unsigned,
00046 void* const, const uint64_t*,
00047 const uint64_t );
00048 typedef size_t ( *GetNumResults_t ) ( void* const, const unsigned );
00049 typedef void ( *GetResult_t ) ( void* const, const unsigned,
00050 const unsigned, void** const,
00051 uint64_t* const );
00052 typedef void ( *Decompress_t ) ( void* const, const unsigned,
00053 const void* const*,
00054 const uint64_t* const,
00055 const unsigned, void* const,
00056 uint64_t* const,
00057 const uint64_t );
00058
00059 Compressor(){}
00060
00062 bool init( const std::string& libraryName );
00063
00065 void exit();
00066
00068 NewCompressor_t newCompressor;
00069
00071 NewDecompressor_t newDecompressor;
00072
00074 DeleteCompressor_t deleteCompressor;
00075
00077 DeleteDecompressor_t deleteDecompressor;
00078
00080 Compress_t compress;
00081
00083 Decompress_t decompress;
00084
00086 GetNumResults_t getNumResults;
00087
00089 GetNumCompressors_t getNumCompressors;
00090
00092 GetResult_t getResult;
00093
00095 bool implementsType( const uint32_t name );
00096
00098 const CompressorInfoVector& getInfos() const { return _infos; }
00099
00100 private:
00101 CompressorInfoVector _infos;
00102 base::DSO _dso;
00103 };
00104
00105 EQ_EXPORT std::ostream& operator << ( std::ostream&,
00106 const EqCompressorInfo& );
00107 }
00108
00109 #endif //EQ_COMPRESSOR_H