Public Member Functions | Private Attributes

ctkPlugins Class Reference

#include <Libs/PluginFramework/ctkPlugins_p.h>

Collaboration diagram for ctkPlugins:
Collaboration graph
[legend]

List of all members.

Public Member Functions

void clear ()
 ctkPlugins (ctkPluginFrameworkContext *fw)
QList< ctkPlugin * > getActivePlugins () const
ctkPlugingetPlugin (int id) const
ctkPlugingetPlugin (const QString &location) const
ctkPlugingetPlugin (const QString &name, const ctkVersion &version) const
QList< ctkPlugin * > getPlugins () const
QList< ctkPlugin * > getPlugins (const QString &name) const
QList< ctkPlugin * > getPlugins (const QString &name, const ctkVersionRange &range) const
ctkPlugininstall (const QUrl &location, QIODevice *in)
void load ()
void remove (const QUrl &location)
void startPlugins (const QList< ctkPlugin * > &slist) const

Private Attributes

ctkPluginFrameworkContextfwCtx
QHash< QString, ctkPlugin * > plugins
QReadWriteLock pluginsLock

Detailed Description

Here we handle all the plugins that are installed in the framework. Also handles load and save of bundle states to a database, so that we can restart the platform.

Definition at line 42 of file ctkPlugins_p.h.


Constructor & Destructor Documentation

ctkPlugins::ctkPlugins ( ctkPluginFrameworkContext fw  ) 

Create a container for all plugins in this framework.

Definition at line 36 of file ctkPlugins.cpp.


Member Function Documentation

void ctkPlugins::clear (  ) 

Definition at line 41 of file ctkPlugins.cpp.

QList< ctkPlugin * > ctkPlugins::getActivePlugins (  )  const

Get all plugins currently in plugin state ACTIVE.

Returns:
A List of ctkPlugins.

Definition at line 261 of file ctkPlugins.cpp.

ctkPlugin * ctkPlugins::getPlugin ( int  id  )  const

Get the plugin that has the specified plugin identifier.

Parameters:
id The identifier of the plugin to get.
Returns:
ctkPlugin or null if the plugin was not found.

Definition at line 142 of file ctkPlugins.cpp.

ctkPlugin * ctkPlugins::getPlugin ( const QString &  location  )  const

Get the plugin that has specified plugin location.

Parameters:
location The location of the plugin to get.
Returns:
ctkPlugin or null if the plugin was not found.

Definition at line 164 of file ctkPlugins.cpp.

ctkPlugin * ctkPlugins::getPlugin ( const QString &  name,
const ctkVersion version 
) const

Get the plugin that has specified plugin symbolic name and version.

Parameters:
name The symbolic name of the plugin to get.
version The plugin version of the plugin to get.
Returns:
ctkPlugin or null.

Definition at line 176 of file ctkPlugins.cpp.

QList< ctkPlugin * > ctkPlugins::getPlugins ( const QString &  name  )  const

Get all plugins that have specified plugin symbolic name.

Parameters:
name The symbolic name of plugins to get.
Returns:
A list of ctkPlugins.

Definition at line 212 of file ctkPlugins.cpp.

QList< ctkPlugin * > ctkPlugins::getPlugins ( const QString &  name,
const ctkVersionRange range 
) const

Get all plugins that have specified plugin symbolic name and version range. Result is sorted in decreasing version order.

Parameters:
name The symbolic name of plugins to get.
range ctkVersion range of plugins to get.
Returns:
A List of ctkPlugins.

Definition at line 232 of file ctkPlugins.cpp.

QList< ctkPlugin * > ctkPlugins::getPlugins (  )  const

Get all installed plugins.

Returns:
A ctkPlugin list with plugins.

Definition at line 199 of file ctkPlugins.cpp.

ctkPlugin * ctkPlugins::install ( const QUrl &  location,
QIODevice *  in 
)

Install a new plugin.

Parameters:
location The location to be installed

Definition at line 48 of file ctkPlugins.cpp.

void ctkPlugins::load (  ) 

Try to load any saved framework state. This is done by installing all saved plugins and restoring the saved state for each plugin. This is only intended to be executed during the start of the framework.

Definition at line 283 of file ctkPlugins.cpp.

void ctkPlugins::remove ( const QUrl &  location  ) 

Remove plugin registration.

Parameters:
location The location to be removed

Definition at line 136 of file ctkPlugins.cpp.

void ctkPlugins::startPlugins ( const QList< ctkPlugin * > &  slist  )  const

Start a list of plugins in order

Parameters:
slist ctkPlugins to start.

Definition at line 312 of file ctkPlugins.cpp.


Member Data Documentation

Link to framework object.

Definition at line 55 of file ctkPlugins_p.h.

QHash<QString, ctkPlugin*> ctkPlugins::plugins [private]

Table of all installed plugins in this framework. Key is the plugin location.

Definition at line 50 of file ctkPlugins_p.h.

QReadWriteLock ctkPlugins::pluginsLock [mutable, private]

Read write lock for protecting the plugins object

Definition at line 60 of file ctkPlugins_p.h.


The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines