Common abstract class to generate extensions. More...
#include <ExtensionGenerator.h>
Inheritance diagram for ExtensionGenerator:
Collaboration diagram for ExtensionGenerator: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().
Here is the call graph for this function:
|
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.
References CamiTKExtensionModel::load().
Here is the call graph for this function:
|
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 CamiTKExtensionModel::getModel(), VariantDataModel::getValue(), TransformEngine::setTemplateString(), and TransformEngine::transformToFile().
Referenced by main().
Here is the call graph for this function:
Here is the caller graph for this function:
|
virtual |
References extensionsDirectory, generateExtensionClass(), generateExtensionCMakeLists(), generateTestDataFiles(), name, testDataDirName, writeCFile(), and writeHFile().
Here is the call graph for this function:
|
protectedpure virtual |
generate an action, a component of a viewer
Implemented in ActionExtensionGenerator, ComponentExtensionGenerator, LibraryGenerator, and ViewerExtensionGenerator.
Referenced by generateExtension().
Here is the caller graph for this function:
|
protectedvirtual |
Helpers methods.
Reimplemented in LibraryGenerator.
References dependencyGenerators, description, extensionType, DependencyGenerator::getCepLibsString(), DependencyGenerator::getExternalLibsString(), DependencyGenerator::getNeededActionsString(), DependencyGenerator::getNeededComponentsString(), and DependencyGenerator::getNeededViewersString().
Referenced by generateExtension().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protectedpure virtual |
Implemented in ActionExtensionGenerator, ComponentExtensionGenerator, LibraryGenerator, and ViewerExtensionGenerator.
Referenced by generateExtension().
Here is the caller graph for this function:
|
protected |
References extensionsDirectory.
Referenced by ExtensionGenerator().
Here is the caller graph for this function:
|
protectedpure virtual |
Implemented in ActionExtensionGenerator, ComponentExtensionGenerator, LibraryGenerator, and ViewerExtensionGenerator.
Referenced by generateExtension().
Here is the caller graph for this function:
|
protectedpure virtual |
Implemented in ActionExtensionGenerator, ComponentExtensionGenerator, LibraryGenerator, and ViewerExtensionGenerator.
Referenced by generateExtension().
Here is the caller graph for this function:
|
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 |
|
protected |
Name of the extension.
Referenced by generateExtension(), LibraryGenerator::generateExtensionCMakeLists(), ActionExtensionGenerator::writeCFile(), ComponentExtensionGenerator::writeCFile(), ViewerExtensionGenerator::writeCFile(), ActionExtensionGenerator::writeHFile(), ComponentExtensionGenerator::writeHFile(), and ViewerExtensionGenerator::writeHFile().