Build an extension from the given CamiTK file. More...
#include <ExtensionBuilder.h>
Inheritance diagram for ExtensionBuilder:
Collaboration diagram for ExtensionBuilder:Public Types | |
| enum | ExtensionBuilderStage { Check_System , Generate_Source_Files , Configure_CMake , Build_Project , Run_CamiTK_Config , Check_Integration , Cleanup } |
| Known stages that can be set in the stage configuration. More... | |
Signals | |
| void | allStagesFinished (bool status) |
| sent when all the stage are finished (with the given overall status) | |
| void | stageFinished (const QString &stage, bool success, const QString &output) |
| sent when the given stage is finished (with the given status and output) | |
| void | stageStarted (const QString &stage) |
| sent when the given stage is starting | |
Public Member Functions | |
| ExtensionBuilder (const QString &camitkFilePath, QObject *parent=nullptr) | |
| constructor | |
| QString | getCurrentStage () const |
| current stage | |
| QString | getStageName (ExtensionBuilderStage value) const |
| utility method to get the QString equivalent of the given stage (underscores are replaced by space) | |
| QStringList | getStages () const |
| get all the stages that were setup | |
| void | setStages (QList< ExtensionBuilderStage > stagesToPerform) |
| you can override default stages by sending an non empty list of stages to perform | |
| void | start () |
| starts all the setup stages | |
| bool | success () const |
| current value of the process | |
| ~ExtensionBuilder () | |
Build an extension from the given CamiTK file.
For python and C++ extensions, this class manages configuration check and source code generation stages. For C++ extensions it also manages the additional required CMake configure/build/check stages.
The following stages can be performed by calling related applications using QProcess:
Set the list of stages you want to perform using setStages (default is do them all) and call start(). Each stage will be performed up to the last stage or up to the first one that fails.
Connect your methods to three given signals to follow the status of each stage.
Known stages that can be set in the stage configuration.
| ExtensionBuilder::ExtensionBuilder | ( | const QString & | camitkFilePath, |
| QObject * | parent = nullptr |
||
| ) |
constructor
| camitkFilePath | the full path of the camitk file (with the .camitk extension) |
| parent | (optional) |
References Build_Project, Check_Integration, Check_System, Cleanup, Configure_CMake, Generate_Source_Files, CamiTKExtensionModel::load(), and Run_CamiTK_Config.
Here is the call graph for this function:| ExtensionBuilder::~ExtensionBuilder | ( | ) |
|
signal |
sent when all the stage are finished (with the given overall status)
Referenced by ExtensionBuilderPresenter::ExtensionBuilderPresenter().
Here is the caller graph for this function:| QString ExtensionBuilder::getCurrentStage | ( | ) | const |
| QString ExtensionBuilder::getStageName | ( | ExtensionBuilderStage | value | ) | const |
utility method to get the QString equivalent of the given stage (underscores are replaced by space)
Referenced by getCurrentStage(), and getStages().
Here is the caller graph for this function:| QStringList ExtensionBuilder::getStages | ( | ) | const |
get all the stages that were setup
References getStageName().
Referenced by ExtensionBuilderPresenter::ExtensionBuilderPresenter().
Here is the call graph for this function:
Here is the caller graph for this function:| void ExtensionBuilder::setStages | ( | QList< ExtensionBuilderStage > | stagesToPerform | ) |
you can override default stages by sending an non empty list of stages to perform
Referenced by ExtensionBuilderPresenter::ExtensionBuilderPresenter().
Here is the caller graph for this function:
|
signal |
sent when the given stage is finished (with the given status and output)
Referenced by ExtensionBuilderPresenter::ExtensionBuilderPresenter().
Here is the caller graph for this function:
|
signal |
sent when the given stage is starting
Referenced by ExtensionBuilderPresenter::ExtensionBuilderPresenter().
Here is the caller graph for this function:| void ExtensionBuilder::start | ( | ) |
starts all the setup stages
| bool ExtensionBuilder::success | ( | ) | const |
current value of the process