Common abstract class to generate extensions. More...
#include <ExtensionGenerator.h>
Public Member Functions | |
| ExtensionGenerator (const QString &camitkFilePath, const QString &outputDirectoryName) | |
| Initialize the extension generator using the given .camitk file Note that if the outputDir does not exist, it will be created here At the end of the constructor, the camitk file is loaded in the camitkExtensionModel attribute and outputDirectoryName is a valid directory. | |
| ExtensionGenerator (QString actionExtensionsDirectory, QString licence="", QString extensionType="NONE") | |
| bool | generate () |
| call all methods to generate the source code Also generate CMake files and user action classes if they don't exist and the output directory is the directory of camitkFilePath (i.e. | |
| virtual void | generateExtension () |
| virtual | ~ExtensionGenerator () |
| virtual | ~ExtensionGenerator ()=default |
Protected Member Functions | |
| void | setExtensionsDirectory (QString extensionsDirectory) |
| virtual void | generateExtensionCMakeLists (QString directory) |
| Helpers methods. | |
| virtual void | generateExtensionClass (QString directory)=0 |
| generate an action, a component of a viewer | |
| virtual void | writeCFile (QString directory)=0 |
| virtual void | writeHFile (QString directory)=0 |
| virtual void | generateTestDataFiles (QString directory, QString testDataDirName)=0 |
Protected Attributes | |
| QVector< DependencyGenerator * > | dependencyGenerators |
| QString | description |
| QString | extensionsDirectory |
| Absolute path to the extensions directory. | |
| QString | extensionType |
| Extension type: Action or Component extension. | |
| QString | licence |
| QString | name |
| Name of the extension. | |
Common abstract class to generate extensions.
Extension generator.
Generate extension source code from a .camitk (JSON) that contains a "camitk"/"extensions" objects.
Currently supported:
| ExtensionGenerator::ExtensionGenerator | ( | QString | actionExtensionsDirectory, |
| QString | licence = "", | ||
| QString | extensionType = "NONE" ) |
References extensionsDirectory, extensionType, licence, and setExtensionsDirectory().
Referenced by ActionExtensionGenerator::ActionExtensionGenerator(), ComponentExtensionGenerator::ComponentExtensionGenerator(), LibraryGenerator::LibraryGenerator(), and ViewerExtensionGenerator::ViewerExtensionGenerator().
|
virtual |
| ExtensionGenerator::ExtensionGenerator | ( | const QString & | camitkFilePath, |
| const QString & | outputDirectoryName ) |
Initialize the extension generator using the given .camitk file Note that if the outputDir does not exist, it will be created here At the end of the constructor, the camitk file is loaded in the camitkExtensionModel attribute and outputDirectoryName is a valid directory.
|
virtualdefault |
| bool ExtensionGenerator::generate | ( | ) |
call all methods to generate the source code Also generate CMake files and user action classes if they don't exist and the output directory is the directory of camitkFilePath (i.e.
if it is the first generation)
References VariantDataModel::getValue().
Referenced by main().
|
virtual |
|
protectedpure virtual |
generate an action, a component of a viewer
Implemented in ActionExtensionGenerator, ComponentExtensionGenerator, LibraryGenerator, and ViewerExtensionGenerator.
Referenced by generateExtension().
|
protectedvirtual |
Helpers methods.
Reimplemented in LibraryGenerator.
References dependencyGenerators, description, extensionType, DependencyGenerator::getCepLibsString(), DependencyGenerator::getExternalLibsString(), DependencyGenerator::getNeededActionsString(), DependencyGenerator::getNeededComponentsString(), and DependencyGenerator::getNeededViewersString().
Referenced by generateExtension().
|
protectedpure virtual |
Implemented in ActionExtensionGenerator, ComponentExtensionGenerator, LibraryGenerator, and ViewerExtensionGenerator.
References testDataDirName.
Referenced by generateExtension().
|
protected |
References extensionsDirectory.
Referenced by ExtensionGenerator().
|
protectedpure virtual |
Implemented in ActionExtensionGenerator, ComponentExtensionGenerator, LibraryGenerator, and ViewerExtensionGenerator.
Referenced by generateExtension().
|
protectedpure virtual |
Implemented in ActionExtensionGenerator, ComponentExtensionGenerator, LibraryGenerator, and ViewerExtensionGenerator.
Referenced by generateExtension().
|
protected |
Referenced by generateExtensionCMakeLists(), and LibraryGenerator::generateExtensionCMakeLists().
|
protected |
|
protected |
Absolute path to the extensions directory.
Referenced by ExtensionGenerator(), generateExtension(), and setExtensionsDirectory().
|
protected |
Extension type: Action or Component extension.
Referenced by ExtensionGenerator(), and generateExtensionCMakeLists().
|
protected |
Referenced by ActionExtensionGenerator::ActionExtensionGenerator(), ActionExtensionGenerator::ActionExtensionGenerator(), ComponentExtensionGenerator::ComponentExtensionGenerator(), ComponentExtensionGenerator::ComponentExtensionGenerator(), ExtensionGenerator(), LibraryGenerator::LibraryGenerator(), LibraryGenerator::LibraryGenerator(), ViewerExtensionGenerator::ViewerExtensionGenerator(), ViewerExtensionGenerator::ViewerExtensionGenerator(), ActionExtensionGenerator::writeCFile(), ComponentExtensionGenerator::writeCFile(), ViewerExtensionGenerator::writeCFile(), ActionExtensionGenerator::writeHFile(), ComponentExtensionGenerator::writeHFile(), and ViewerExtensionGenerator::writeHFile().
|
protected |
Name of the extension.
Referenced by generateExtension(), LibraryGenerator::generateExtensionCMakeLists(), ActionExtensionGenerator::writeCFile(), ComponentExtensionGenerator::writeCFile(), ViewerExtensionGenerator::writeCFile(), ActionExtensionGenerator::writeHFile(), ComponentExtensionGenerator::writeHFile(), and ViewerExtensionGenerator::writeHFile().