22 #ifndef __KPIM_SHARED_PLUGINLOADER_H__
23 #define __KPIM_SHARED_PLUGINLOADER_H__
25 #include <pluginloaderbase.h>
78 template< typename T, typename T_config >
102 doScan( T_config::path );
109 void * main_func = mainFunc( type, T_config::mainfunc );
110 if ( !main_func ) return 0;
114 return ((T* (*)())( main_func ))();
118 template< typename T, typename T_config >
119 PluginLoader<T,T_config> * PluginLoader<T,T_config>::mSelf = 0;
123 #define KPIM_DEFINE_PLUGIN_LOADER( pl, t, mf, p ) \
125 struct TDE_EXPORT pl##Config { \
126 static const char * const mainfunc; \
127 static const char * const path; \
129 const char * const pl##Config::mainfunc = mf; \
130 const char * const pl##Config::path = p; \
132 typedef KPIM::PluginLoader< t, pl##Config > pl; \
A generic plugin loader for when KPart::Plugin is overkill.
static PluginLoader< T, T_config > * instance() Returns the single instance of this loader.
virtual T * createForName(const TQString &type) const Returns a pointer to a plugin object (of type T) or a null pointer if the type wasn't found.
virtual void scan() Rescans the plugin directory to find any newly installed plugins.
TDEPIM classes for drag and drop of mails.
|