Equalizer
1.4.1
|
00001 00002 /* Copyright (c) 2010, Cedric Stalder <cedric.stalder@gmail.com> 00003 * 2010-2012, 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 CO_PLUGINREGISTRY_H 00020 #define CO_PLUGINREGISTRY_H 00021 00022 #include <co/api.h> 00023 #include <co/types.h> 00024 00025 #include <string> 00026 00027 namespace co 00028 { 00030 class PluginRegistry 00031 { 00032 public: 00040 PluginRegistry(); 00041 00046 CO_API void addDirectory( const std::string& path ); 00047 00049 CO_API void removeDirectory( const std::string& path ); 00050 00055 CO_API const Strings& getDirectories() const; 00056 00058 void init(); 00059 00061 void exit(); 00062 00064 CO_API const Plugins& getPlugins() const; 00065 00067 CO_API Plugin* findPlugin( const uint32_t name ); 00068 00070 CO_API bool addPlugin( const std::string& filename ); 00071 00072 private: 00073 Strings _directories; 00074 Plugins _plugins; 00075 }; 00076 } 00077 #endif // CO_PLUGINREGISTRY_H