client/compressor.h

Go to the documentation of this file.
00001 
00002 /* Copyright (c) 2009, Cedric Stalder <cedric.stalder@gmail.com> 
00003  *               2009, Stefan Eilemann <eile@equalizergraphics.com>
00004  *
00005  * This library is free software; you can redistribute it and/or modify it under
00006  * the terms of the GNU Lesser General Public License version 2.1 as published
00007  * by the Free Software Foundation.
00008  *  
00009  * This library is distributed in the hope that it will be useful, but WITHOUT
00010  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
00011  * FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
00012  * details.
00013  * 
00014  * You should have received a copy of the GNU Lesser General Public License
00015  * along with this library; if not, write to the Free Software Foundation, Inc.,
00016  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
00017  */
00018 
00019 #ifndef EQ_COMPRESSOR_H
00020 #define EQ_COMPRESSOR_H
00021 
00022 #include <eq/plugins/compressor.h> // member
00023 #include <eq/client/types.h>
00024 #include <eq/base/dso.h>           // member
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
Generated on Sat Feb 6 12:59:50 2010 for Equalizer 0.9.1 by  doxygen 1.6.1