dso.h

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 EQBASE_DSO_H
00020 #define EQBASE_DSO_H
00021 
00022 #include <eq/base/base.h>
00023 #include <eq/base/nonCopyable.h>
00024 
00025 #include <string>
00026 
00027 namespace eq
00028 {
00029 namespace base
00030 {
00031 
00033     class DSO : public NonCopyable
00034     {
00035     public:
00037         EQ_EXPORT DSO() : _dso( 0 ) {}
00038 
00045         EQ_EXPORT bool open( const std::string& fileName );
00046 
00048         EQ_EXPORT void close();
00049     
00052         EQ_EXPORT void* getFunctionPointer( const std::string& functionName );
00053 
00054     private:
00055 #ifdef WIN32
00056         HMODULE _dso;
00057 #else
00058         void* _dso;
00059 #endif
00060     };
00061 
00062 }
00063 }
00064 
00065 #endif //EQBASE_DSO_H
Generated on Mon Aug 10 18:58:32 2009 for Equalizer 0.9 by  doxygen 1.5.8