This class contains the entry points to generate CEP. More...
#include <CepGenerator.h>
Public Member Functions | |
CepGenerator () | |
Create an empty CepGenerator. More... | |
CepGenerator (QString xmlFilename, QString devDirectoryName) | |
Create a CEPGenerator from the XML file xmlFileName in the directory devDirectoryName . More... | |
CepGenerator (std::unique_ptr< cepcoreschema::Cep > domCep, QString devDirectoryName) | |
Create a CEPGenerator from the DOM XML-schema domCep in the directory devDirectoryName . More... | |
void | createDomTree () |
Create the DOM attribute domCep from the XML CEP manifest. More... | |
void | process () |
call all methods to generate the CEP from the DomTree. More... | |
void | serializeManifest (QString fileName="") |
Serialize the manifest ie serialize the domCep to a std::string. More... | |
void | setDevDirectoryName (QString devDirectoryName) |
Where to generate the CEP directories and files. More... | |
void | setXmlFileName (QString xmlFileName) |
Set the input XML CEP manifest (ant check its xml validity) More... | |
virtual | ~CepGenerator () |
Protected Member Functions | |
virtual void | createActionExtensionDoms () |
Create the ActionExtensionDom if needed and call the appropriate methods to generate the action extensions. More... | |
virtual void | createComponentExtensionDoms () |
Create the ComponentExtensionDom if needed and call the appropriate methods to generate the component extensions. More... | |
virtual void | createLibrarieDoms () |
Create the LibrariesDom if needed and call the appropriate methods to generate the libraries. More... | |
virtual void | createViewersExtensionDoms () |
Create the ViewersDom if needed and call the appropriate methods to generate the viewer extensions. More... | |
virtual void | generateDirectoryTree () |
Create the general directory tree (the same for every CEP). More... | |
virtual void | generateExtensions () |
virtual void | generateGlobalCMakeLists () |
Generate CMakeLists file. More... | |
virtual void | generateCopyright () |
Generate copyright file. More... | |
virtual void | generateReadme () |
Generate Readme File. More... | |
virtual void | copyFindCamiTK () |
Generate the FindCamiTK file. More... | |
virtual void | generateActionsDirectory () |
Generate the Actions directory. More... | |
virtual void | generateApplicationsDirectory () |
Generate the Applications directory. More... | |
virtual void | generateComponentsDirectory () |
Generate the Components directory. More... | |
virtual void | generateLibrariesDirectory () |
Generate the Libraries directory. More... | |
virtual void | generateViewersDirectory () |
Generate the Libraries directory. More... | |
virtual void | setLicence () |
Set the licence ine the licence variable to be included later in the generated files. More... | |
Private Attributes | |
QString | cepDirectoryName |
Subdirectory where the CEP sources will be stored (updated when generating the directory tree) More... | |
QDir | devDirectoryName |
Where to store the produced files. More... | |
std::unique_ptr< cepcoreschema::Cep > | domCep |
XML DOM Element create by CodeSynthesis This cep instance contains all of the informations of the xml file. More... | |
QVector< ExtensionGenerator * > | extensions |
Action or Component Extensions. More... | |
QString | licence |
overall licence of the CEP More... | |
QFileInfo | xmlFileName |
Where to find the original XML description of the CEP. More... | |
This class contains the entry points to generate CEP.
A CEP is generated form an XML file or from a dom xml-schema.
See wiki to understand how a CEP is buildt. \nRelease 3.5: Suppose that the CEP does NOT already exist.
CepGenerator::CepGenerator | ( | QString | xmlFilename, |
QString | devDirectoryName | ||
) |
Create a CEPGenerator from the XML file xmlFileName
in the directory devDirectoryName
.
Supposes that the CEP does NOT exist. Create a domCep from the XML file
References createDomTree(), devDirectoryName, initMyResource(), setDevDirectoryName(), and setXmlFileName().
CepGenerator::CepGenerator | ( | std::unique_ptr< cepcoreschema::Cep > | domCep, |
QString | devDirectoryName | ||
) |
Create a CEPGenerator from the DOM XML-schema domCep
in the directory devDirectoryName
.
Supposes that the CEP does NOT exist.
domCep
. When sending your unique_ptr
you need to use std::move(yourDomCep)
for the first parameter References devDirectoryName, domCep, initMyResource(), and setDevDirectoryName().
CepGenerator::CepGenerator | ( | ) |
Create an empty CepGenerator.
References initMyResource().
|
virtual |
References extensions.
|
protectedvirtual |
Generate the FindCamiTK file.
References cepDirectoryName, and devDirectoryName.
Referenced by generateDirectoryTree().
|
protectedvirtual |
Create the ActionExtensionDom if needed and call the appropriate methods to generate the action extensions.
References cepActionsDirectoryName, cepDirectoryName, devDirectoryName, domCep, extensions, and licence.
Referenced by process().
|
protectedvirtual |
Create the ComponentExtensionDom if needed and call the appropriate methods to generate the component extensions.
References cepComponentsDirectoryName, cepDirectoryName, devDirectoryName, domCep, extensions, and licence.
Referenced by process().
void CepGenerator::createDomTree | ( | ) |
Create the DOM attribute domCep from the XML CEP manifest.
References domCep, and xmlFileName.
Referenced by CepGenerator().
|
protectedvirtual |
Create the LibrariesDom if needed and call the appropriate methods to generate the libraries.
References cepDirectoryName, cepLibrariesDirectoryName, devDirectoryName, domCep, extensions, and licence.
Referenced by process().
|
protectedvirtual |
Create the ViewersDom if needed and call the appropriate methods to generate the viewer extensions.
References cepDirectoryName, cepViewersDirectoryName, devDirectoryName, domCep, extensions, and licence.
Referenced by process().
|
protectedvirtual |
Generate the Actions directory.
References cepActionsDirectoryName, cepDirectoryName, and devDirectoryName.
Referenced by generateDirectoryTree().
|
protectedvirtual |
Generate the Applications directory.
References cepApplicationsDirectoryName, cepDirectoryName, and devDirectoryName.
|
protectedvirtual |
Generate the Components directory.
References cepComponentsDirectoryName, cepDirectoryName, and devDirectoryName.
Referenced by generateDirectoryTree().
|
protectedvirtual |
Generate copyright file.
References cepDirectoryName, devDirectoryName, and licence.
Referenced by generateDirectoryTree().
|
protectedvirtual |
Create the general directory tree (the same for every CEP).
Copies the default files in the right directories:
References cepDirectoryName, copyFindCamiTK(), devDirectoryName, domCep, generateActionsDirectory(), generateComponentsDirectory(), generateCopyright(), generateGlobalCMakeLists(), generateLibrariesDirectory(), generateReadme(), generateViewersDirectory(), ClassNameHandler::getDirectoryName(), and serializeManifest().
Referenced by process().
|
protectedvirtual |
References extensions.
Referenced by process().
|
protectedvirtual |
Generate CMakeLists file.
Helper methods for generateDirectoryTree
References cepDirectoryName, devDirectoryName, and domCep.
Referenced by generateDirectoryTree().
|
protectedvirtual |
Generate the Libraries directory.
References cepDirectoryName, cepLibrariesDirectoryName, and devDirectoryName.
Referenced by generateDirectoryTree().
|
protectedvirtual |
Generate Readme File.
References cepDirectoryName, devDirectoryName, and domCep.
Referenced by generateDirectoryTree().
|
protectedvirtual |
Generate the Libraries directory.
References cepDirectoryName, cepViewersDirectoryName, and devDirectoryName.
Referenced by generateDirectoryTree().
void CepGenerator::process | ( | ) |
call all methods to generate the CEP from the DomTree.
References createActionExtensionDoms(), createComponentExtensionDoms(), createLibrarieDoms(), createViewersExtensionDoms(), generateDirectoryTree(), generateExtensions(), and setLicence().
Referenced by main(), and GeneratingCEPState::onEntry().
void CepGenerator::serializeManifest | ( | QString | fileName = "" | ) |
Serialize the manifest ie serialize the domCep to a std::string.
References cepDirectoryName, cepManifestExtension, cepManifestName, cepSchemaNamespace, devDirectoryName, and domCep.
Referenced by generateDirectoryTree().
void CepGenerator::setDevDirectoryName | ( | QString | devDirectoryName | ) |
Where to generate the CEP directories and files.
References devDirectoryName.
Referenced by CepGenerator().
|
protectedvirtual |
void CepGenerator::setXmlFileName | ( | QString | xmlFileName | ) |
Set the input XML CEP manifest (ant check its xml validity)
References xmlFileName.
Referenced by CepGenerator().
|
private |
Subdirectory where the CEP sources will be stored (updated when generating the directory tree)
Referenced by copyFindCamiTK(), createActionExtensionDoms(), createComponentExtensionDoms(), createLibrarieDoms(), createViewersExtensionDoms(), generateActionsDirectory(), generateApplicationsDirectory(), generateComponentsDirectory(), generateCopyright(), generateDirectoryTree(), generateGlobalCMakeLists(), generateLibrariesDirectory(), generateReadme(), generateViewersDirectory(), and serializeManifest().
|
private |
Where to store the produced files.
Referenced by CepGenerator(), copyFindCamiTK(), createActionExtensionDoms(), createComponentExtensionDoms(), createLibrarieDoms(), createViewersExtensionDoms(), generateActionsDirectory(), generateApplicationsDirectory(), generateComponentsDirectory(), generateCopyright(), generateDirectoryTree(), generateGlobalCMakeLists(), generateLibrariesDirectory(), generateReadme(), generateViewersDirectory(), serializeManifest(), and setDevDirectoryName().
|
private |
XML DOM Element create by CodeSynthesis This cep instance contains all of the informations of the xml file.
Referenced by CepGenerator(), createActionExtensionDoms(), createComponentExtensionDoms(), createDomTree(), createLibrarieDoms(), createViewersExtensionDoms(), generateDirectoryTree(), generateGlobalCMakeLists(), generateReadme(), serializeManifest(), and setLicence().
|
private |
Action or Component Extensions.
Referenced by createActionExtensionDoms(), createComponentExtensionDoms(), createLibrarieDoms(), createViewersExtensionDoms(), generateExtensions(), and ~CepGenerator().
|
private |
overall licence of the CEP
Referenced by createActionExtensionDoms(), createComponentExtensionDoms(), createLibrarieDoms(), createViewersExtensionDoms(), generateCopyright(), and setLicence().
|
private |
Where to find the original XML description of the CEP.
Referenced by createDomTree(), and setXmlFileName().