Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 #ifndef RVE_PLUGINLOADER_LOADER_H
00031 #define RVE_PLUGINLOADER_LOADER_H
00032
00033 #include <list>
00034
00035 #include <boost/shared_ptr.hpp>
00036
00037 namespace rve_pluginloader
00038 {
00039
00040 void init();
00041 void shutdown();
00042
00043 class Plugin;
00044 typedef boost::shared_ptr<Plugin> PluginPtr;
00045 typedef std::list<PluginPtr> L_Plugin;
00046
00047 void loadDescriptions(const std::string& registry_package);
00048 void loadAllPlugins(const std::string& registry_package);
00049 PluginPtr loadPlugin(const std::string& description_file);
00050 PluginPtr loadDescription(const std::string& description_file);
00051
00052 PluginPtr getPlugin(const std::string& description_file);
00053 PluginPtr getPluginByPackage(const std::string& package);
00054 const L_Plugin& getPlugins();
00055
00056 PluginPtr getPluginForClass(const std::string& base_class, const std::string& derived_class);
00057
00058 void* create(const std::string& base_class, const std::string& derived_class);
00059
00060 template<typename T>
00061 T* create(const std::string& base_class, const std::string& derived_class)
00062 {
00063 T* t = static_cast<T*>(create(base_class, derived_class));
00064 return t;
00065 }
00066
00067 boost::shared_ptr<void> createShared(const std::string& base_class, const std::string& derived_class);
00068
00069 template<typename T>
00070 boost::shared_ptr<T> createShared(const std::string& base_class, const std::string& derived_class)
00071 {
00072 return boost::static_pointer_cast<T>(createShared(base_class, derived_class));
00073 }
00074
00075 void destroy(void* mem);
00076
00077 }
00078
00079 #endif // RVE_PLUGINLOADER_LOADER_H