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

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

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Protected Member Functions | Private Types | Private Attributes | List of all members
Umbrello::Configurable Class Referenceabstract
Umbrello2 API

`#include <configurable.h>`

Inheritance diagram for Umbrello::Configurable:

## Public Member Functions
| Configurable ()
virtual | ~Configurable ()
virtual bool | configure ()=0

## Protected Member Functions
bool | loadPlugins (KConfig *config, const QString &group, const QString &key)
bool | unloadPlugins ()

## Private Types
typedef QList< Plugin * > | PluginList

## Private Attributes
PluginList | _plugins
| List of loaded plugins.

## Detailed Description

The Configurable class is the base class of all functional objects that can be created for modeling applications. There are three types of functionality: applications (with GUIs), command line tools and plugins. This class provides a common configuration interface that the functional classes use for default configuration and plugin management. Although the Configurable class is primarily an interface it does provide some convenience methods that can be used by derived classes to help manage plugins. These methods are conceptually part of a larger (although currently undefined) set of configuration helper methods that reduce the amount of code duplication for applications, tools and plugins.

At this time, this class only assists with the configuration of the event-driven plugin management system. All interfaces and convenience methods support the hidden configuration functionality for derived classes.

Todo
  Do we have to delete the plugin object when its unloaded? Is it possible that we can just unload the library and created objects are automatically destroyed? I need some clarification of what actually happens here...

## Member Typedef Documentation

## ◆ PluginList

typedef QList<Plugin*> Umbrello::Configurable::PluginList
| private

## Constructor & Destructor Documentation

## ◆ Configurable()

Configurable::Configurable | ( |  | ) |

Construct a configurable object.

## ◆ ~Configurable()

Configurable::~Configurable | ( |  | ) |
| virtual

Destroy a configurable object. If there are any plugins that (for some reason) have not been unloaded, we need to unload them here.

## Member Function Documentation

## ◆ configure()

virtual bool Umbrello::Configurable::configure | ( |  | ) |
| pure virtual

The configure interface is required to be implemented by all subclasses of this class. It is expected that configuration implementations all understand how to attain their session configuration file. These files are stored in ~/.kde/share/config. What actions are taken with the configuration class are defined by implementing classes.

Implemented in Umbrello::Plugin.

## ◆ loadPlugins()

bool Configurable::loadPlugins | ( | KConfig * | config,
|  | const QString & | group,
|  | const QString & | key )
| protected

This is a convenience method for derived classes. Configuration actions that are intended to load plugins can use this method to parse the string and actually load the plugins. The string is a set of space separated names. Each name corresponds to the share object implementing the plugin.

Parameters

  config | The object used for configuration.
  group | The group in the config object.
  key | The key in the group that contains libraries to load.

Returns
  True on success, false on failure.

## ◆ unloadPlugins()

bool Configurable::unloadPlugins | ( |  | ) |
| protected

This is a convenience method for derived classes. When a functional object (i.e., application, tool or plugin) is shutdown, it can use this method to automatically unload all dependent plugins.

Returns
  True on success false on failure.

## Member Data Documentation

## ◆ _plugins

PluginList Umbrello::Configurable::_plugins
| private

List of loaded plugins.

The documentation for this class was generated from the following files:

- umbrello/_unused/configurable.h
- umbrello/_unused/configurable.cpp