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

#include <ComponentGenerator.h>

Public Types

enum  RepresentationType { IMAGE, MESH, NONE }

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.
QString className
 Name of the created Component class redundant information already contained in theAction, for practicle purpose.
QDir devDirectoryName
 Where to store the produced files.
bool hasParameters
 Does the component have properties ?
QMap< QString, QPair< QString,
QString > > 
parameters
 List containing all properties of the component For practical reasons, this map contains for each parameter:
RepresentationType representation
std::auto_ptr< ComponenttheComponent
 XML DOM Element create by CodeSynthesis This component contains all of the informations of the xml file.
QFileInfo xmlFileName
 Where to find the XML description of the Action.

Member Enumeration Documentation

Enumerator:
IMAGE 
MESH 
NONE 

Constructor & Destructor Documentation

ComponentGenerator::ComponentGenerator ( QString  xmlFilename,
QString  devDirectoryName 
)
protected

Member Function Documentation

void ComponentGenerator::createElement ( ) throw (QString)
protectedvirtual
bool ComponentGenerator::generateComponentFiles ( QString  xmlFileName,
QString  devDirectoryName,
QString *  elementClassName = NULL 
)
static
void ComponentGenerator::generateComponentFiles ( ) throw (QString)
protectedvirtual

References writeCFile(), and writeHFile().

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

Referenced by ComponentGenerator().

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

Referenced by ComponentGenerator().

void ComponentGenerator::writeCFile ( ) throw (QString)
protectedvirtual
void ComponentGenerator::writeHFile ( ) throw (QString)
protectedvirtual

Member Data Documentation

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

Set of additional files to include.

Referenced by createElement(), and writeCFile().

QString ComponentGenerator::className
protected

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

Referenced by ComponentGenerator(), createElement(), generateComponentFiles(), writeCFile(), and writeHFile().

QDir ComponentGenerator::devDirectoryName
protected

Where to store the produced files.

Referenced by writeCFile(), and writeHFile().

bool ComponentGenerator::hasParameters
protected

Does the component have properties ?

Referenced by ComponentGenerator(), and createElement().

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)

Referenced by createElement(), and writeCFile().

RepresentationType ComponentGenerator::representation
protected
std::auto_ptr<Component> ComponentGenerator::theComponent
protected

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

Referenced by createElement().

QFileInfo ComponentGenerator::xmlFileName
protected

Where to find the XML description of the Action.

Referenced by createElement().


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