Equalizer  1.2.1
base/pluginRegistry.h
00001 
00002 /* Copyright (c) 2010, Cedric Stalder <cedric.stalder@gmail.com> 
00003  *               2010-2011, Stefan Eilemann <eile@eyescale.ch>
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 COBASE_PLUGINREGISTRY_H
00020 #define COBASE_PLUGINREGISTRY_H
00021 
00022 #include <co/base/api.h>
00023 #include <co/base/types.h>
00024 
00025 #include <string>
00026 
00027 namespace co
00028 {
00029 namespace base
00030 {
00032     class PluginRegistry
00033     {
00034     public:
00042         PluginRegistry();
00043 
00048         COBASE_API void addDirectory( const std::string& path );
00049 
00051         COBASE_API void removeDirectory( const std::string& path );
00052 
00057         COBASE_API const Strings& getDirectories() const;
00058 
00060         void init();
00061         
00063         void exit();
00064         
00066         COBASE_API const Plugins& getPlugins() const;
00067 
00069         COBASE_API Plugin* findPlugin( const uint32_t name );
00070 
00072         COBASE_API bool addPlugin( const std::string& filename );
00073 
00074     private:
00075         Strings _directories;
00076         Plugins _plugins;
00077     };
00078 }
00079 }
00080 #endif // COBASE_PLUGINREGISTRY_H
Generated on Fri Jun 8 2012 15:44:32 for Equalizer 1.2.1 by  doxygen 1.8.0