35 #ifndef ICL_CORE_PLUGIN_PLUGIN_H_INCLUDED 36 #define ICL_CORE_PLUGIN_PLUGIN_H_INCLUDED 44 #if defined(_SYSTEM_WIN32_) && defined(_IC_STATIC_) 45 #define ICL_CORE_PLUGIN_LINKAGE static 46 #else // defined(_SYSTEM_WIN32_) && defined(_IC_STATIC_) 47 #define ICL_CORE_PLUGIN_LINKAGE 48 #endif // defined(_SYSTEM_WIN32_) && defined(_IC_STATIC_) 50 #define ICL_CORE_PLUGIN_DECLARE_PLUGIN_INTERFACE(name) \ 52 virtual std::string Identifier() const = 0; \ 53 typedef const char* identifier(); \ 54 typedef const char* basetype(); \ 55 typedef name* load_plugin(); \ 56 typedef void unload_plugin(name*); 58 #define ICL_CORE_PLUGIN_DECLARE_PLUGIN \ 60 virtual std::string Identifier() const; \ 62 #define ICL_CORE_PLUGIN_REGISTER_PLUGIN_IMPORT_EXPORT(decl, base, derived, plugin_identifier) \ 63 std::string derived::Identifier() const \ 65 return plugin_identifier; \ 68 extern "C" ICL_CORE_PLUGIN_LINKAGE decl const char * identifier() \ 70 return plugin_identifier; \ 73 extern "C" ICL_CORE_PLUGIN_LINKAGE decl const char * basetype() \ 75 return typeid(base).name(); \ 78 extern "C" ICL_CORE_PLUGIN_LINKAGE decl base* load_plugin() \ 83 extern "C" ICL_CORE_PLUGIN_LINKAGE decl void unload_plugin(derived* p) \ 88 #define ICL_CORE_PLUGIN_REGISTER_PLUGIN(base, derived, plugin_identifier) \ 89 ICL_CORE_PLUGIN_REGISTER_PLUGIN_IMPORT_EXPORT(, base, derived, plugin_identifier) 91 #define ICL_CORE_PLUGIN_MANAGER_DEFINITION(name, interface, directory) \ 92 name : public icl_core::plugin::PluginManager<interface, directory> { \ 95 LOGGING_TRACE(icl_core::plugin::Plugin, "Using plugin search path " \ 96 << directory << icl_core::logging::endl); \ 100 #define ICL_CORE_PLUGIN_DECLARE_PLUGIN_MANAGER(name, interface, directory) \ 101 class ICL_CORE_PLUGIN_MANAGER_DEFINITION(name, interface, directory) 102 #define ICL_CORE_PLUGIN_DECLARE_PLUGIN_MANAGER_IMPORT_EXPORT(decl, name, interface, directory) \ 103 class decl ICL_CORE_PLUGIN_MANAGER_DEFINITION(name, interface, directory) Contains import/export definitions for the Win32 plattform.
Contains logging definitions for the icl_core_plugin library.