Lunchbox  1.4.0
dso.h
00001 
00002 /* Copyright (c)      2009, Cedric Stalder <cedric.stalder@gmail.com> 
00003  *               2009-2012, 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 LUNCHBOX_DSO_H
00020 #define LUNCHBOX_DSO_H
00021 
00022 #include <lunchbox/api.h>
00023 #include <lunchbox/nonCopyable.h>
00024 
00025 #include <string>
00026 
00027 namespace lunchbox
00028 {
00029 namespace detail { class DSO; }
00030 
00032     class DSO : public NonCopyable
00033     {
00034     public:
00036         LUNCHBOX_API DSO();
00037 
00039         LUNCHBOX_API ~DSO();
00040 
00048         LUNCHBOX_API bool open( const std::string& fileName );
00049 
00054         LUNCHBOX_API void close();
00055     
00061         LUNCHBOX_API void* getFunctionPointer( const std::string& functionName);
00062 
00064         LUNCHBOX_API bool isOpen() const;
00065 
00066     private:
00067         detail::DSO* const _impl;
00068     };
00069 
00070 }
00071 
00072 #endif //LUNCHBOX_DSO_H