|
|
|
@ -33,7 +33,7 @@ to create factories for TDevelop plugins. For example, for DummyPlugin
|
|
|
|
|
the factory can be created (in dummyplugin.cpp file) as:
|
|
|
|
|
@code
|
|
|
|
|
typedef KDevGenericFactory<DummyPlugin> DummyPluginFactory;
|
|
|
|
|
K_EXPORT_COMPONENT_FACTORY(libkdevdummyplugin, DummyPluginFactory( data ) )
|
|
|
|
|
K_EXPORT_COMPONENT_FACTORY(libkdevdummyplugin, DummyPluginFactory( pluginData ) )
|
|
|
|
|
@endcode
|
|
|
|
|
Data should be a const static object. This way it complies with the requirements
|
|
|
|
|
for data objecs of KDevGenericFactory constructor.
|
|
|
|
@ -47,12 +47,12 @@ For example, dummyplugin.cpp file could contain:
|
|
|
|
|
@code
|
|
|
|
|
#include <kdevplugininfo.h>
|
|
|
|
|
|
|
|
|
|
static const KDevPluginInfo data("KDevDummyPlugin");
|
|
|
|
|
static const KDevPluginInfo pluginData("KDevDummyPlugin");
|
|
|
|
|
typedef KDevGenericFactory<DummyPlugin> DummyPluginFactory;
|
|
|
|
|
K_EXPORT_COMPONENT_FACTORY(libkdevdummyplugin, DummyPluginFactory( data ) )
|
|
|
|
|
K_EXPORT_COMPONENT_FACTORY(libkdevdummyplugin, DummyPluginFactory( pluginData ) )
|
|
|
|
|
|
|
|
|
|
DummyPlugin::DummyPlugin(TQObject *parent, const char *name, const TQStringList & )
|
|
|
|
|
:KDevPlugin(&data, parent, name)
|
|
|
|
|
:KDevPlugin(&pluginData, parent, name)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
@endcode
|
|
|
|
|