umbrello API Documentation

Umbrello::Configurable Class Reference
[class class Umbrello2 API]

#include <configurable.h>

Inheritance diagram for Umbrello::Configurable:

Umbrello::Plugin List of all members.

Public Member Functions

 Configurable ()
 Construct a configurable object.
virtual ~Configurable ()
 Destroy a configurable object.
virtual bool configure ()=0
 The configure interface is required to be implemented by all subclasses of this class.

Protected Member Functions

bool loadPlugins (KConfig *config, const QString &key)
 This is a convenience method for derived classes.
bool unloadPlugins ()
 This is a convenience method for derived classes.

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 (althought 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.

Definition at line 67 of file configurable.h.


Constructor & Destructor Documentation

Configurable::Configurable  ) 
 

Construct a configurable object.

Definition at line 35 of file configurable.cpp.

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.

Definition at line 41 of file configurable.cpp.

References unloadPlugins().


Member Function Documentation

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.

bool Configurable::loadPlugins KConfig *  config,
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 the the share object implementing the plugin.

Parameters:
config The object used for configuration.
key The key in the group that contains libraries to load.
Returns:
True on success, false on failure.

Definition at line 47 of file configurable.cpp.

References Umbrello::PluginLoader::instance(), and Umbrello::PluginLoader::loadPlugin().

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 dependant plugins.

Returns:
True on success false on failure.

Definition at line 71 of file configurable.cpp.

References Umbrello::Plugin::unload().

Referenced by ~Configurable().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for umbrello Version 3.1.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Tue Jun 26 08:08:09 2007 by doxygen 1.4.1 written by Dimitri van Heesch, © 1997-2003