umbrello 2.38.4
Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology
Classes | Namespaces | Macros
plugin.h File Reference
#include <qobject.h>
#include <kgenericfactory.h>
#include "configurable.h"
Include dependency graph for plugin.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Umbrello::Plugin
 

Namespaces

namespace  Umbrello
 

Macros

#define UMBRELLO_EXPORT_PLUGIN_FACTORY(libname, factory)    extern "C" { KDE_EXPORT void *init_##libname() { return new factory(#libname); } }
 

Macro Definition Documentation

◆ UMBRELLO_EXPORT_PLUGIN_FACTORY

#define UMBRELLO_EXPORT_PLUGIN_FACTORY (   libname,
  factory 
)     extern "C" { KDE_EXPORT void *init_##libname() { return new factory(#libname); } }

This macro replaces the K_EXPORT_COMPONENT_FACTORY macro because of a simple deficiency for this application - the construction of the factory with a default instance name. This macro must be used in the .cpp file implementing the plugin.

Parameters
libnameThe name of the plugin. This corresponds to the name of the shared object without the ".so" extension.
factoryThe type of factory. Typically, this will be KGenericFactory<> with the name of the plugin as the parameter.