![]() |
CTK
0.1.0
The Common Toolkit is a community effort to provide support code for medical image analysis, surgical navigation, and related projects.
|
#include <Libs/PluginFramework/ctkPluginFramework.h>
Public Member Functions | |
QHash< QString, QString > | getHeaders () |
QByteArray | getResource (const QString &path) const |
QStringList | getResourceList (const QString &path) const |
void | init () |
void | start (const ctkPlugin::StartOptions &options=0) |
void | stop (const StopOptions &options=0) |
void | uninstall () |
ctkPluginFrameworkEvent | waitForStop (unsigned long timeout) |
![]() | |
virtual QStringList | findResources (const QString &path, const QString &filePattern, bool recurse) const |
QString | getLocation () const |
ctkPluginContext * | getPluginContext () const |
long | getPluginId () const |
ctkPluginLocalization | getPluginLocalization (const QLocale &locale, const QString &base=ctkPluginConstants::PLUGIN_LOCALIZATION_DEFAULT_BASENAME) const |
State | getState () const |
QString | getSymbolicName () const |
ctkVersion | getVersion () const |
virtual void | start (const StartOptions &options=START_ACTIVATION_POLICY) |
void | update (const QUrl &updateLocation=QUrl()) |
virtual | ~ctkPlugin () |
Protected Member Functions | |
ctkPluginFramework () | |
![]() | |
ctkPlugin () | |
void | init (const QWeakPointer< ctkPlugin > &self, ctkPluginFrameworkContext *fw, QSharedPointer< ctkPluginArchive > ba) |
void | init (ctkPluginPrivate *dd) |
Friends | |
class | ctkPluginFrameworkContext |
Additional Inherited Members | |
![]() | |
enum | StartOption { START_TRANSIENT = 0x00000001 , START_ACTIVATION_POLICY = 0x00000002 } |
enum | State { UNINSTALLED = 0x00000001 , INSTALLED = 0x00000002 , RESOLVED = 0x00000004 , STARTING = 0x00000008 , STOPPING = 0x00000010 , ACTIVE = 0x00000020 } |
enum | StopOption { STOP_TRANSIENT = 0x00000001 } |
![]() | |
ctkPluginPrivate * | d_ptr |
A ctkPluginFramework instance. A ctkPluginFramework is also known as a System Plugin.
ctkPluginFramework instances are created using a ctkPluginFrameworkFactory. The methods of this class can be used to manage and control the created plugin framework instance.
Definition at line 45 of file ctkPluginFramework.h.
|
protected |
|
virtual |
Reimplemented from ctkPlugin.
|
virtual |
Reimplemented from ctkPlugin.
|
virtual |
Reimplemented from ctkPlugin.
void ctkPluginFramework::init | ( | ) |
Initialize this ctkPluginFramework. After calling this method, this ctkPluginFramework must:
This ctkPluginFramework will not actually be started until start is called.
This method does nothing if called when this ctkPluginFramework is in the STARTING, ACTIVE or STOPPING states.
ctkPluginException | If this ctkPluginFramework could not be initialized. |
void ctkPluginFramework::start | ( | const ctkPlugin::StartOptions & | options = 0 | ) |
Start this ctkPluginFramework.
The following steps are taken to start this ctkPluginFramework:
options | Ignored. There are no start options for the ctkPluginFramework. |
ctkPluginException | If this ctkPluginFramework could not be started. |
|
virtual |
Stop this ctkPluginFramework.
The method returns immediately to the caller after initiating the following steps to be taken on another thread.
After being stopped, this Framework may be discarded, initialized or started.
options | Ignored. There are no stop options for the Framework. |
ctkPluginException | If stopping this Framework could not be initiated. |
Reimplemented from ctkPlugin.
|
virtual |
The ctkPluginFramework cannot be uninstalled.
This method always throws a ctkPluginException.
ctkPluginException | This Framework cannot be uninstalled. |
Reimplemented from ctkPlugin.
ctkPluginFrameworkEvent ctkPluginFramework::waitForStop | ( | unsigned long | timeout | ) |
Wait until this ctkPluginFramework has completely stopped. The stop
and update
methods perform an asynchronous stop of the Framework. This method can be used to wait until the asynchronous stop of this Framework has completed. This method will only wait if called when this Framework is in the STARTING, ACTIVE, or STOPPING states. Otherwise it will return immediately.
A Framework Event is returned to indicate why this Framework has stopped.
timeout | Maximum number of milliseconds to wait until this Framework has completely stopped. A value of zero will wait indefinitely. |
ctkPluginFrameworkEvent
types may be returned by this method. STOPPED - This Framework has been stopped.
STOPPED_UPDATE - This Framework has been updated which has shutdown and will now restart.
ERROR - The Framework encountered an error while shutting down or an error has occurred which forced the framework to shutdown.
|
friend |
Definition at line 195 of file ctkPluginFramework.h.