dRonin  adbada4
dRonin GCS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Groups Pages
ExtensionSystem::PluginSpec Class Reference

Contains the information of the plugins xml description file and information about the plugin's current state. More...

#include <pluginspec.h>

Public Types

enum  State {
  Invalid, Read, Resolved, Loaded,
  Initialized, Running, Stopped, Deleted
}
 
typedef QList
< PluginArgumentDescription
PluginArgumentDescriptions
 

Public Member Functions

 ~PluginSpec ()
 
QString name () const
 
QString version () const
 
QString compatVersion () const
 
QString vendor () const
 
QString copyright () const
 
QString license () const
 
QString description () const
 
QString url () const
 
QList< PluginDependencydependencies () const
 
PluginArgumentDescriptions argumentDescriptions () const
 
QString location () const
 
QString filePath () const
 
QStringList arguments () const
 
void setArguments (const QStringList &arguments)
 
void addArgument (const QString &argument)
 
bool provides (const QString &pluginName, const QString &version) const
 
QList< PluginSpec * > dependencySpecs () const
 
IPluginplugin () const
 
State state () const
 
bool hasError () const
 
QString errorString () const
 

Friends

class Internal::PluginManagerPrivate
 

Detailed Description

Contains the information of the plugins xml description file and information about the plugin's current state.

ExtensionSystem::PluginDependency::name String identifier of the plugin.

ExtensionSystem::PluginDependency::version Version string that a plugin must match to fill this dependency.

The plugin spec is also filled with more information as the plugin goes through its loading process (see PluginSpec::State). If an error occurs, the plugin spec is the place to look for the error details.

Definition at line 63 of file pluginspec.h.

Member Typedef Documentation

Member Enumeration Documentation

The plugin goes through several steps while being loaded. The state gives a hint on what went wrong in case of an error.

Invalid Starting point: Even the xml description file was not read. Read The xml description file has been successfully read, and its information is available via the PluginSpec. Resolved The dependencies given in the description file have been successfully found, and are available via the dependencySpecs() method. Loaded The plugin's library is loaded and the plugin instance created (available through plugin()). Initialized The plugin instance's IPlugin::initialize() method has been called and returned a success value. Running The plugin's dependencies are successfully initialized and extensionsInitialized has been called. The loading process is complete. Stopped The plugin has been shut down, i.e. the plugin's IPlugin::shutdown() method has been called. Deleted The plugin instance has been deleted.

Enumerator
Invalid 
Read 
Resolved 
Loaded 
Initialized 
Running 
Stopped 
Deleted 

Definition at line 66 of file pluginspec.h.

Constructor & Destructor Documentation

PluginSpec::~PluginSpec ( )

Definition at line 148 of file pluginspec.cpp.

Member Function Documentation

void PluginSpec::addArgument ( const QString &  argument)

Adds argument to the command line arguments specific to that plugin.

Definition at line 290 of file pluginspec.cpp.

PluginSpec::PluginArgumentDescriptions PluginSpec::argumentDescriptions ( ) const

Returns a list of descriptions of command line arguments the plugin processes.

Definition at line 240 of file pluginspec.cpp.

QStringList PluginSpec::arguments ( ) const

Command line arguments specific to that plugin. Set at startup

Definition at line 270 of file pluginspec.cpp.

QString PluginSpec::compatVersion ( ) const

The plugin compatibility version. This is valid after the PluginSpec::Read state is reached.

Definition at line 176 of file pluginspec.cpp.

QString PluginSpec::copyright ( ) const

The plugin copyright. This is valid after the PluginSpec::Read state is reached.

Definition at line 194 of file pluginspec.cpp.

QList< PluginDependency > PluginSpec::dependencies ( ) const

The plugin dependencies. This is valid after the PluginSpec::Read state is reached.

Definition at line 230 of file pluginspec.cpp.

QList< PluginSpec * > PluginSpec::dependencySpecs ( ) const

Returns the list of dependencies, already resolved to existing plugin specs. Valid if PluginSpec::Resolved state is reached.

See Also
PluginSpec::dependencies()

Definition at line 353 of file pluginspec.cpp.

QString PluginSpec::description ( ) const

The plugin description. This is valid after the PluginSpec::Read state is reached.

Definition at line 212 of file pluginspec.cpp.

QString PluginSpec::errorString ( ) const

Detailed, possibly multi-line, error description in case of an error.

Definition at line 319 of file pluginspec.cpp.

QString PluginSpec::filePath ( ) const

The absolute path to the plugin xml description file (including the file name) this PluginSpec corresponds to.

Definition at line 260 of file pluginspec.cpp.

bool PluginSpec::hasError ( ) const

Returns whether an error occurred while reading/starting the plugin.

Definition at line 310 of file pluginspec.cpp.

QString PluginSpec::license ( ) const

The plugin license. This is valid after the PluginSpec::Read state is reached.

Definition at line 203 of file pluginspec.cpp.

QString PluginSpec::location ( ) const

The absolute path to the directory containing the plugin xml description file this PluginSpec corresponds to.

Definition at line 250 of file pluginspec.cpp.

QString PluginSpec::name ( ) const

The plugin name. This is valid after the PluginSpec::Read state is reached.

Definition at line 158 of file pluginspec.cpp.

IPlugin * PluginSpec::plugin ( ) const

The corresponding IPlugin instance, if the plugin library has already been successfully loaded, i.e. the PluginSpec::Loaded state is reached.

Definition at line 341 of file pluginspec.cpp.

bool PluginSpec::provides ( const QString &  pluginName,
const QString &  version 
) const

Returns if this plugin can be used to fill in a dependency of the given pluginName and version.

\sa PluginSpec::dependencies()

Definition at line 331 of file pluginspec.cpp.

void PluginSpec::setArguments ( const QStringList &  arguments)

Set the command line arguments specific to that plugin to arguments.

Definition at line 280 of file pluginspec.cpp.

PluginSpec::State PluginSpec::state ( ) const

The state in which the plugin currently is. See the description of the PluginSpec::State enum for details.

Definition at line 301 of file pluginspec.cpp.

QString PluginSpec::url ( ) const

The plugin url where you can find more information about the plugin. This is valid after the PluginSpec::Read state is reached.

Definition at line 221 of file pluginspec.cpp.

QString PluginSpec::vendor ( ) const

The plugin vendor. This is valid after the PluginSpec::Read state is reached.

Definition at line 185 of file pluginspec.cpp.

QString PluginSpec::version ( ) const

The plugin version. This is valid after the PluginSpec::Read state is reached.

Definition at line 167 of file pluginspec.cpp.

Friends And Related Function Documentation

friend class Internal::PluginManagerPrivate
friend

Definition at line 109 of file pluginspec.h.


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