umbrello: umbrello/_unused/plugin.h File Reference

umbrello 2.38.2 Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

Classes | Namespaces | Macros
plugin.h File Reference
`#include <qobject.h>`
`#include <kgenericfactory.h>`
`#include "configurable.h"`

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

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