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

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

#include <HotPlugActionExtension.h>

Public Member Functions

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 QString getProgrammingLanguage () const =0
 get the programming language of this extension (either C++ or Python)
virtual void init () override
 This calls initActions, but ignores the return value.
virtual bool initActions (int progressMinimum=0, int progressMaximum=100)=0
 instantiate all the actions (might generate some warnings)
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

Static Public Member Functions

static HotPlugActionExtensionnewHotPlugActionExtension (const QString &camitkFilePath, bool forceVerifyOrRebuild)

Protected Member Functions

 HotPlugActionExtension (const QString &camitkFilePath)
 constructor
Protected Member Functions inherited from camitk::ActionExtension
 ActionExtension ()
 constructor
void registerAction (Action *)
 register an action instance

Protected Attributes

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.

Note: the location of the extension is the path to the camitk extension file. Use getLocation() to get the file path of the CamiTK extension file that generated this extension.

Constructor & Destructor Documentation

◆ HotPlugActionExtension()

◆ ~HotPlugActionExtension()

camitk::HotPlugActionExtension::~HotPlugActionExtension ( )
override

destructor

Member Function Documentation

◆ declaredActionCount()

int camitk::HotPlugActionExtension::declaredActionCount ( ) const
virtual

◆ getDescription()

QString camitk::HotPlugActionExtension::getDescription ( ) const
overridevirtual

returns the action extension small description (to be overriden in your ActionExtension)

Implements camitk::ActionExtension.

References description.

◆ getName()

QString camitk::HotPlugActionExtension::getName ( ) const
overridevirtual

returns the action extension name (to be overriden in your ActionExtension)

Implements camitk::ActionExtension.

References name.

◆ getProgrammingLanguage()

virtual QString camitk::HotPlugActionExtension::getProgrammingLanguage ( ) const
pure virtual

get the programming language of this extension (either C++ or Python)

Implemented in camitk::CppHotPlugActionExtension.

References init().

◆ init()

void camitk::HotPlugActionExtension::init ( )
overridevirtual

This calls initActions, but ignores the return value.

Should never be called directly.

Implements camitk::ActionExtension.

References initActions().

Referenced by getProgrammingLanguage(), and camitk::CppHotPlugActionExtension::initActions().

◆ initActions()

virtual bool camitk::HotPlugActionExtension::initActions ( int progressMinimum = 0,
int progressMaximum = 100 )
pure virtual

instantiate all the 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

Implemented in camitk::CppHotPlugActionExtension.

References declaredActionCount(), and isSuccessfullyLoaded().

Referenced by init(), and camitk::HotPlugExtensionManager::load().

◆ isSuccessfullyLoaded()

bool camitk::HotPlugActionExtension::isSuccessfullyLoaded ( )
Returns
true if all the action were instantiated and loaded successfully

References successfullyLoaded.

Referenced by initActions().

◆ newHotPlugActionExtension()

HotPlugActionExtension * camitk::HotPlugActionExtension::newHotPlugActionExtension ( const QString & camitkFilePath,
bool forceVerifyOrRebuild )
static

Member Data Documentation

◆ description

QString camitk::HotPlugActionExtension::description
protected

description in few word/sentences

Referenced by getDescription(), and HotPlugActionExtension().

◆ name

QString camitk::HotPlugActionExtension::name
protected

short name of the extension (as it will displayed in the Dev Studio menu for instance)

Referenced by getName(), HotPlugActionExtension(), and camitk::CppHotPlugActionExtension::initActions().

◆ successfullyLoaded

bool camitk::HotPlugActionExtension::successfullyLoaded
protected

true if the extension as well ass all the actions libraries were loaded successfully

Referenced by HotPlugActionExtension(), camitk::CppHotPlugActionExtension::initActions(), and isSuccessfullyLoaded().


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