Computer Assisted Medical Intervention Tool Kit  version 6.0
Loading...
Searching...
No Matches
camitk::CppHotPlugActionExtension Class Reference

An ActionExtension that can be created on the fly from a camitk extension file. More...

#include <CppHotPlugActionExtension.h>

Public Member Functions

 CppHotPlugActionExtension (const QString &camitkFilePath, bool forceRebuild=false)
 constructor
virtual QString getProgrammingLanguage () const override
 get the programming language of this extension
virtual bool initActions (int progressMinimum=0, int progressMaximum=100) override
 instantiate all the C++ actions (might generate some warnings).
void watchActionLibrary (QString libraryPath, HotPlugAction *action)
 add this file to the file system watcher In fact only one library is watched (the last to register) As all the library should be updated at the same time during a rebuild only one file is to be watched: the extension only needs to be informed once (this will avoid race condition in the signal sent by fileSystemWatcher)
 ~CppHotPlugActionExtension () override
 destructor
Public Member Functions inherited from camitk::HotPlugActionExtension
virtual int declaredActionCount () const
virtual QString getDescription () const override
 returns the action extension small description (to be overriden in your ActionExtension)
virtual QString getName () const override
 returns the action extension name (to be overriden in your ActionExtension)
virtual void init () override
 This calls initActions, but ignores the return value.
bool isSuccessfullyLoaded ()
 ~HotPlugActionExtension () override
 destructor
Public Member Functions inherited from camitk::ActionExtension
const ActionListgetActions ()
 get the list of actions registered y this extension
QString getLocation () const
 get the file path (location of the .dll/.so/.dylib) of this plugin or the file path to the CamiTK extension file that generated this extension
void initResources ()
 Load, for the selected langage (asked to the Application), the associated .qm file.
void setLocation (const QString loc)
 set the file path (once loaded as a dynamic library)
 ~ActionExtension () override
 destructor

Additional Inherited Members

Static Public Member Functions inherited from camitk::HotPlugActionExtension
static HotPlugActionExtensionnewHotPlugActionExtension (const QString &camitkFilePath, bool forceVerifyOrRebuild)
Protected Member Functions inherited from camitk::HotPlugActionExtension
 HotPlugActionExtension (const QString &camitkFilePath)
 constructor
Protected Member Functions inherited from camitk::ActionExtension
 ActionExtension ()
 constructor
void registerAction (Action *)
 register an action instance
Protected Attributes inherited from camitk::HotPlugActionExtension
QString description
 description in few word/sentences
QString name
 short name of the extension (as it will displayed in the Dev Studio menu for instance)
bool successfullyLoaded
 true if the extension as well ass all the actions libraries were loaded successfully
Protected Attributes inherited from camitk::ActionExtension
ActionList actions
 the list of actions

Detailed Description

An ActionExtension that can be created on the fly from a camitk extension file.

Constructor & Destructor Documentation

◆ CppHotPlugActionExtension()

camitk::CppHotPlugActionExtension::CppHotPlugActionExtension ( const QString & camitkFilePath,
bool forceRebuild = false )

◆ ~CppHotPlugActionExtension()

camitk::CppHotPlugActionExtension::~CppHotPlugActionExtension ( )
override

destructor

Member Function Documentation

◆ getProgrammingLanguage()

virtual QString camitk::CppHotPlugActionExtension::getProgrammingLanguage ( ) const
inlineoverridevirtual

get the programming language of this extension

Implements camitk::HotPlugActionExtension.

◆ initActions()

bool camitk::CppHotPlugActionExtension::initActions ( int progressMinimum = 0,
int progressMaximum = 100 )
overridevirtual

instantiate all the C++ actions (might generate some warnings).

Note
this method must set the successfullyLoaded to false and return false when some action could not be instantiated
Parameters
progressMinimumis the current initial progress value
progressMaximumis the maximum progress bar value to use when all actions are initialized

Implements camitk::HotPlugActionExtension.

References camitk::ActionExtension::actions, camitk::ActionExtension::getLocation(), CamiTKExtensionModel::getModel(), camitk::HotPlugActionExtension::init(), camitk::HotPlugActionExtension::name, camitk::ActionExtension::registerAction(), VariantDataModel::size(), and camitk::HotPlugActionExtension::successfullyLoaded.

◆ watchActionLibrary()

void camitk::CppHotPlugActionExtension::watchActionLibrary ( QString libraryPath,
HotPlugAction * action )

add this file to the file system watcher In fact only one library is watched (the last to register) As all the library should be updated at the same time during a rebuild only one file is to be watched: the extension only needs to be informed once (this will avoid race condition in the signal sent by fileSystemWatcher)


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