Main Page | Modules | Class Hierarchy | Class List | File List | Class Members | File Members | Related Pages

SLPluginRegister.hpp

00001 // $Id: SLPluginRegister.hpp,v 1.6 2004/04/15 00:04:52 mr_lex Exp $
00002 #ifndef SL_PLUGIN_REGISTER_HPP
00003 #define SL_PLUGIN_REGISTER_HPP
00004 #include <vector>
00005 #include <string>
00006 
00007 #include "segusoland.hpp"
00008 #include "SLPlugin.hpp"
00009 #include "SLString.hpp"
00010 #include "SLPluginDynLoader.hpp"
00011 #include "SLNotFoundException.hpp"
00012 
00013 SL_NAMESPACE_BEGIN
00014 using namespace std;
00015 
00030 class SLPluginRegister {
00031 
00032 public:
00036     class NotFoundException : public SLNotFoundException {
00037     public:
00039         NotFoundException(const SLString &message) :
00040             SLNotFoundException(message)
00041         { }
00042     };
00043     
00044     SLPluginRegister();
00045     ~SLPluginRegister();
00046 
00051     void registerPlugin(const SLPlugin *plugin);
00052 
00072      SLPluginFeature * getFeature(SLPluginFeature::Type::Types type, const SLString *name = NULL)
00073          throw(NotFoundException);
00074 
00079      void shutdown()
00080          throw(SLPluginDynLoader::IOException);
00081 
00082 private:
00083     vector<SLPlugin *> plugins;
00084 }; // class SLPluginRegister
00085 
00086 
00087 /*
00088  * The static register hook.
00089  * registerer has to be called by each plugin via ::SL_PLUGIN_REGISTER
00090  * @see SLPluginRegister
00091  * @see ::SL_PLUGIN_REGISTER
00092  */
00093 extern SLPluginRegister registerer;
00094 
00095 
00096 SL_NAMESPACE_END
00097 #endif // #ifndef SL_PLUGIN_REGISTER_HPP
00098 
00099 // $Log: SLPluginRegister.hpp,v $
00100 // Revision 1.6  2004/04/15 00:04:52  mr_lex
00101 // NEW: files plugin + autotools up to date
00102 //
00103 // Revision 1.5  2004/04/13 13:56:15  mr_lex
00104 // NEW: added mysql plugin
00105 //
00106 // Revision 1.4  2004/04/05 23:42:41  mr_lex
00107 // FIX: various Exceptions issues + unloading of plugins
00108 //
00109 // Revision 1.3  2004/04/05 18:11:54  mr_lex
00110 // NEW: 1st working version of plugins
00111 //
00112 // Revision 1.2  2004/04/03 15:07:34  mr_lex
00113 // NEW: plugin system and toolkit nearly mature
00114 //
00115 // Revision 1.1  2004/04/01 19:04:44  mr_lex
00116 // NEW: moved from plugins directory
00117 //
00118 

Generated on Mon Apr 19 01:03:33 2004 for segusoLand by doxygen 1.3.6-20040222