Computer Assited Medical Intervention Tool Kit  version 4.0
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
CepGenerator Class Reference

This class contains the entry points to generate CEP. More...

#include <CepGenerator.h>

Public Member Functions

 CepGenerator (QString xmlFilename, QString devDirectoryName)
 Create a CEPGenerator from the XML file xmlFileName in the directory devDirectoryName. More...
 
 CepGenerator (std::auto_ptr< cepcoreschema::Cep > domCep, QString devDirectoryName)
 Create a CEPGenerator from the DOM XML-schema domCep in the directory devDirectoryName. More...
 
void process () throw (QString)
 call all methods to generate the CEP from the DomTree. More...
 
 ~CepGenerator ()
 

Protected Member Functions

virtual void createActionExtensionDoms ()
 Create the ActionExtensionDom if needed and call the appropriate methods to generate the actions Extensions. More...
 
virtual void createComponentExtensionDoms ()
 Create the ComponentExtensionDom if needed and call the appropriate methods to generate the components Extensions. More...
 
virtual void createLibrarieDoms ()
 Create the LibrariesDom if needed and call the appropriate methods to generate the libraries. More...
 
virtual void generateDirectoryTree () throw (QString)
 Create the general directory tree (the same for every CEP) Copies the default files in the right directories: More...
 
virtual void generateExtensions ()
 
virtual void setDevDirectoryName (QString devDirectoryName) throw (QString)
 Where to generate the CEP directories and files. More...
 
virtual void setXmlFileName (QString xmlFileName) throw (QString)
 Set the input XML CEP manifest (ant check its xml validity) More...
 
virtual void serializeManifest ()
 Serialize the manifest ie serialize the domCep to a std::string. More...
 
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 setLicence ()
 Set the licence ine the licence variable to be included later in the generated files. More...
 

Private Member Functions

virtual void createDomTree () throw (QString)
 Create the DOM attribute domCep from the XML CEP manifest. 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::auto_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
 Action Extensions. More...
 
QFileInfo xmlFileName
 Where to find the original XML description of the CEP. More...
 

Detailed Description

This class contains the entry points to generate CEP.

A CEP is generated form an XML file or from a dom xml-schema.
See https://forge.imag.fr/plugins/mediawiki/wiki/camitk/index.php/CEP to understand how a CEP is buildt.
Release 3.5: Suppose that the CEP does NOT already exist.

Constructor & Destructor Documentation

◆ CepGenerator() [1/2]

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 initMyResource().

◆ CepGenerator() [2/2]

CepGenerator::CepGenerator ( std::auto_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.

References initMyResource().

◆ ~CepGenerator()

CepGenerator::~CepGenerator ( )

Member Function Documentation

◆ copyFindCamiTK()

void CepGenerator::copyFindCamiTK ( )
protectedvirtual

Generate the FindCamiTK file.

◆ createActionExtensionDoms()

void CepGenerator::createActionExtensionDoms ( )
protectedvirtual

Create the ActionExtensionDom if needed and call the appropriate methods to generate the actions Extensions.

References cepActionsDirectoryName.

◆ createComponentExtensionDoms()

void CepGenerator::createComponentExtensionDoms ( )
protectedvirtual

Create the ComponentExtensionDom if needed and call the appropriate methods to generate the components Extensions.

References cepComponentsDirectoryName.

◆ createDomTree()

void CepGenerator::createDomTree ( )
throw (QString
)
privatevirtual

Create the DOM attribute domCep from the XML CEP manifest.

◆ createLibrarieDoms()

void CepGenerator::createLibrarieDoms ( )
protectedvirtual

Create the LibrariesDom if needed and call the appropriate methods to generate the libraries.

References cepLibrariesDirectoryName.

◆ generateActionsDirectory()

void CepGenerator::generateActionsDirectory ( )
protectedvirtual

Generate the Actions directory.

References cepActionsDirectoryName.

◆ generateApplicationsDirectory()

void CepGenerator::generateApplicationsDirectory ( )
protectedvirtual

Generate the Applications directory.

References cepApplicationsDirectoryName.

◆ generateComponentsDirectory()

void CepGenerator::generateComponentsDirectory ( )
protectedvirtual

Generate the Components directory.

References cepComponentsDirectoryName.

◆ generateCopyright()

void CepGenerator::generateCopyright ( )
protectedvirtual

Generate copyright file.

◆ generateDirectoryTree()

void CepGenerator::generateDirectoryTree ( )
throw (QString
)
protectedvirtual

Create the general directory tree (the same for every CEP) Copies the default files in the right directories:

cepdirectoryname | +— actions | -— CMakeLists.txt --— CMakeLists.txt +— components | -— CMakeLists.txt -— COPYRIGHT -— FindCamiTK.cmake +— libraries | — CMakeLists.txt -— Manifest.xml -— README

References ClassNameHandler::getDirectoryName().

◆ generateExtensions()

void CepGenerator::generateExtensions ( )
protectedvirtual

◆ generateGlobalCMakeLists()

void CepGenerator::generateGlobalCMakeLists ( )
protectedvirtual

Generate CMakeLists file.

◆ generateLibrariesDirectory()

void CepGenerator::generateLibrariesDirectory ( )
protectedvirtual

Generate the Libraries directory.

References cepLibrariesDirectoryName.

◆ generateReadme()

void CepGenerator::generateReadme ( )
protectedvirtual

Generate Readme File.

◆ process()

void CepGenerator::process ( )
throw (QString
)

call all methods to generate the CEP from the DomTree.

Referenced by main(), and GeneratingCEPState::onEntry().

◆ serializeManifest()

void CepGenerator::serializeManifest ( )
protectedvirtual

Serialize the manifest ie serialize the domCep to a std::string.

Helping Functions for generateDirectoryTree

References cepManifestExtension, cepManifestName, and cepSchemaNamespace.

◆ setDevDirectoryName()

void CepGenerator::setDevDirectoryName ( QString  devDirectoryName)
throw (QString
)
protectedvirtual

Where to generate the CEP directories and files.

◆ setLicence()

void CepGenerator::setLicence ( )
protectedvirtual

Set the licence ine the licence variable to be included later in the generated files.

◆ setXmlFileName()

void CepGenerator::setXmlFileName ( QString  xmlFileName)
throw (QString
)
protectedvirtual

Set the input XML CEP manifest (ant check its xml validity)

Member Data Documentation

◆ cepDirectoryName

QString CepGenerator::cepDirectoryName
private

Subdirectory where the CEP sources will be stored (updated when generating the directory tree)

◆ devDirectoryName

QDir CepGenerator::devDirectoryName
private

Where to store the produced files.

◆ domCep

std::auto_ptr<cepcoreschema::Cep> CepGenerator::domCep
private

XML DOM Element create by CodeSynthesis This cep instance contains all of the informations of the xml file.

◆ extensions

QVector<ExtensionGenerator *> CepGenerator::extensions
private

Action or Component Extensions.

◆ licence

QString CepGenerator::licence
private

Action Extensions.

Component Extensions

◆ xmlFileName

QFileInfo CepGenerator::xmlFileName
private

Where to find the original XML description of the CEP.


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