Computer Assited Medical Intervention Tool Kit  version 3.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
applications/wizard-old/ComponentGenerator.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * $CAMITK_LICENCE_BEGIN$
3  *
4  * CamiTK - Computer Assisted Medical Intervention ToolKit
5  * (c) 2001-2014 UJF-Grenoble 1, CNRS, TIMC-IMAG UMR 5525 (GMCAO)
6  *
7  * Visit http://camitk.imag.fr for more information
8  *
9  * This file is part of CamiTK.
10  *
11  * CamiTK is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * CamiTK is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  * GNU Lesser General Public License version 3 for more details.
19  *
20  * You should have received a copy of the GNU Lesser General Public License
21  * version 3 along with CamiTK. If not, see <http://www.gnu.org/licenses/>.
22  *
23  * $CAMITK_LICENCE_END$
24  ****************************************************************************/
25 #ifndef COMPONENTGENERATOR_H
26 #define COMPONENTGENERATOR_H
27 
28 #if defined(_WIN32) && !defined(__MINGW32__) // MSVC only
29 #pragma warning( disable : 4290 )
30 #endif // MSVC only
31 
32 #include <set>
33 
34 // includes from Qt
35 #include <QMap>
36 #include <QDir>
37 #include <QPair>
38 #include <QString>
39 #include <QFileInfo>
40 #include <QTextStream>
41 
42 #include <Component.hxx>
43 
44 class ComponentGenerator {
45 
46 public :
51  };
52  static bool generateComponentFiles(QString xmlFileName, QString devDirectoryName, QString * elementClassName = NULL);
53 
54 protected:
55  ComponentGenerator(QString xmlFilename, QString devDirectoryName);
56 
57  virtual void setXmlFileName(QString xmlFileName) throw (QString);
58  virtual void setDevDirectoryName(QString devDirectoryName) throw (QString);
59 
60  virtual void createElement() throw (QString);
61  virtual void generateComponentFiles() throw (QString);
62 
63  virtual void writeHFile() throw (QString);
64  virtual void writeCFile() throw (QString);
65 
66 
70  std::auto_ptr<coreschema::Component> theComponent;
71 
73  QFileInfo xmlFileName;
74 
77 
80  QString className;
81 
84 
93  QMap<QString, QPair<QString, QString> > parameters;
94 
96  std::set<QString> additionalIncludes;
97 
99 };
100 #endif
virtual void createElement()
ComponentGenerator(QString xmlFileName, QString licence)
QString representation
Definition: libraries/cepgenerator/ComponentGenerator.h:85
virtual void writeHFile()
Definition: applications/wizard-old/ComponentGenerator.h:50
TODO Celine comment here please.
Definition: libraries/cepgenerator/ComponentGenerator.h:54
set(CAMITK_TEST_PLATEFORM ${Plateform}) set(CAMITK_SVN_SUBDIR $
Definition: CamiTKTestBuildMacros.cmake:15
bool hasParameters
Does the component have properties ?
Definition: applications/wizard-old/ComponentGenerator.h:83
Definition: applications/wizard-old/ComponentGenerator.h:49
QString className
Name of the created Component class redundant information already contained in theAction, for practicle purpose.
Definition: libraries/cepgenerator/ComponentGenerator.h:83
virtual void writeCFile()
A component is something that composed something and could also be a part of something.
Definition: modeling/libraries/pml/Component.h:48
virtual void generateComponentFiles()
std::auto_ptr< coreschema::Component > theComponent
XML DOM Element create by CodeSynthesis This component contains all of the informations of the xml fi...
Definition: applications/wizard-old/ComponentGenerator.h:70
QFileInfo xmlFileName
Where to find the XML description of the Action.
Definition: applications/wizard-old/ComponentGenerator.h:73
virtual void setDevDirectoryName(QString devDirectoryName)
virtual void setXmlFileName(QString xmlFileName)
QMap< QString, QPair< QString, QString > > parameters
List containing all properties of the component For practical reasons, this map contains for each par...
Definition: applications/wizard-old/ComponentGenerator.h:93
std::set< QString > additionalIncludes
Set of additional files to include.
Definition: applications/wizard-old/ComponentGenerator.h:96
QDir devDirectoryName
Where to store the produced files.
Definition: applications/wizard-old/ComponentGenerator.h:76
Definition: applications/wizard-old/ComponentGenerator.h:48
RepresentationType
Definition: applications/wizard-old/ComponentGenerator.h:47