Computer Assited Medical Intervention Tool Kit  version 3.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
ComponentGenerator Class Reference

TODO Celine comment here please. More...

#include <ComponentGenerator.h>

Public Types

enum  RepresentationType { IMAGE, MESH, NONE }
 

Public Member Functions

 ComponentGenerator (QString xmlFileName, QString licence) throw (QString)
 
 ComponentGenerator (cepcoreschema::Component &domComponent, QString licence)
 
void generateFiles (QString directoryName)
 
QString getClassName () const
 
QStringList getSuffixesList ()
 
 ~ComponentGenerator ()
 

Static Public Member Functions

static bool generateComponentFiles (QString xmlFileName, QString devDirectoryName, QString *elementClassName=NULL)
 

Protected Member Functions

 ComponentGenerator (QString xmlFilename, QString devDirectoryName)
 
virtual void createElement () throw (QString)
 
virtual void generateComponentFiles () throw (QString)
 
virtual void setDevDirectoryName (QString devDirectoryName) throw (QString)
 
virtual void setXmlFileName (QString xmlFileName) throw (QString)
 
virtual void writeCFile () throw (QString)
 
virtual void writeHFile () throw (QString)
 

Protected Attributes

std::set< QString > additionalIncludes
 Set of additional files to include. More...
 
QDir devDirectoryName
 Where to store the produced files. More...
 
bool hasParameters
 Does the component have properties ? More...
 
QMap< QString, QPair< QString,
QString > > 
parameters
 List containing all properties of the component For practical reasons, this map contains for each parameter: More...
 
RepresentationType representation
 
std::auto_ptr
< coreschema::Component
theComponent
 XML DOM Element create by CodeSynthesis This component contains all of the informations of the xml file. More...
 
QFileInfo xmlFileName
 Where to find the XML description of the Action. More...
 

Private Member Functions

void createFromDom (cepcoreschema::Component &dom)
 Helper methods for constructors. More...
 
QString getParentClassName ()
 
void writeCFile (QString directoryName)
 
void writeHFile (QString directoryName)
 

Private Attributes

QString className
 Name of the created Component class redundant information already contained in theAction, for practicle purpose. More...
 
QVector< ParameterGenerator * > componentProperties
 
QString description
 
QString licence
 
QString name
 Name of the action. More...
 
QString representation
 
QStringList suffixesList
 

Detailed Description

TODO Celine comment here please.

Member Enumeration Documentation

Enumerator
IMAGE 
MESH 
NONE 

Constructor & Destructor Documentation

ComponentGenerator::ComponentGenerator ( QString  xmlFileName,
QString  licence 
)
throw (QString
)
ComponentGenerator::ComponentGenerator ( cepcoreschema::Component domComponent,
QString  licence 
)
ComponentGenerator::~ComponentGenerator ( )
ComponentGenerator::ComponentGenerator ( QString  xmlFilename,
QString  devDirectoryName 
)
protected

Member Function Documentation

virtual void ComponentGenerator::createElement ( )
throw (QString
)
protectedvirtual
void ComponentGenerator::createFromDom ( cepcoreschema::Component dom)
private

Helper methods for constructors.

static bool ComponentGenerator::generateComponentFiles ( QString  xmlFileName,
QString  devDirectoryName,
QString *  elementClassName = NULL 
)
static
virtual void ComponentGenerator::generateComponentFiles ( )
throw (QString
)
protectedvirtual
void ComponentGenerator::generateFiles ( QString  directoryName)
QString ComponentGenerator::getClassName ( ) const
QString ComponentGenerator::getParentClassName ( )
private
QStringList ComponentGenerator::getSuffixesList ( )
virtual void ComponentGenerator::setDevDirectoryName ( QString  devDirectoryName)
throw (QString
)
protectedvirtual
virtual void ComponentGenerator::setXmlFileName ( QString  xmlFileName)
throw (QString
)
protectedvirtual
virtual void ComponentGenerator::writeCFile ( )
throw (QString
)
protectedvirtual
void ComponentGenerator::writeCFile ( QString  directoryName)
private
virtual void ComponentGenerator::writeHFile ( )
throw (QString
)
protectedvirtual
void ComponentGenerator::writeHFile ( QString  directoryName)
private

Member Data Documentation

std::set<QString> ComponentGenerator::additionalIncludes
protected

Set of additional files to include.

QString ComponentGenerator::className
private

Name of the created Component class redundant information already contained in theAction, for practicle purpose.

QVector<ParameterGenerator *> ComponentGenerator::componentProperties
private
QString ComponentGenerator::description
private
QDir ComponentGenerator::devDirectoryName
protected

Where to store the produced files.

bool ComponentGenerator::hasParameters
protected

Does the component have properties ?

QString ComponentGenerator::licence
private
QString ComponentGenerator::name
private

Name of the action.

QMap<QString, QPair<QString, QString> > ComponentGenerator::parameters
protected

List containing all properties of the component For practical reasons, this map contains for each parameter:

  • key: the name of the parameter
  • value: a QPair of element:
    • first: the type of the parameter
    • second: the default value of the parameter (if non exists in the XML file, a default one is given)
QString ComponentGenerator::representation
private
RepresentationType ComponentGenerator::representation
protected
QStringList ComponentGenerator::suffixesList
private
std::auto_ptr<coreschema::Component> ComponentGenerator::theComponent
protected

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

QFileInfo ComponentGenerator::xmlFileName
protected

Where to find the XML description of the Action.


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