Computer Assited Medical Intervention Tool Kit  version 3.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
applications/wizard-old/ActionGenerator.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 ACTIONGENERATOR_H
26 #define ACTIONGENERATOR_H
27 
28 #if defined(_WIN32) && !defined(__MINGW32__) // MSVC only
29 #pragma warning( disable : 4290 )
30 #endif // MSVC only
31 
32 // include from STD
33 #include <set>
34 
35 // includes from Qt
36 #include <QMap>
37 #include <QDir>
38 #include <QPair>
39 #include <QString>
40 #include <QFileInfo>
41 #include <QTextStream>
42 
43 // coreschema
44 #include <Parameters.hxx>
45 #include <Action.hxx>
46 
47 class ActionGenerator {
48 public :
49  static bool generateActionFiles(QString xmlFileName, QString devDirectoryName, QString * elementClassName = NULL);
50 
51 protected:
52  ActionGenerator(QString xmlFilename, QString devDirectoryName);
53 
54  virtual void setXmlFileName(QString xmlFileName) throw (QString);
55  virtual void setDevDirectoryName(QString devDirectoryName) throw (QString);
56 
57 
58  virtual void createElement() throw (QString);
59  virtual void generateActionFiles() throw (QString);
60 
61  virtual void writeHFile() throw (QString);
62  virtual void writeCFile() throw (QString);
63  virtual void writeImplementationFile() throw (QString);
64 
68  std::auto_ptr<coreschema::Action> theAction;
69 
71  QFileInfo xmlFileName;
72 
75 
78  QString className;
79 
90  QMap<QString, QPair<QString, QString> > parameters;
91 
94 
95 private:
96  bool isItkFilter;
97 
98 };
99 
100 #endif
virtual void generateActionFiles()
virtual void createElement()
QString className
Name of the created Action class redundant information already contained in theAction, for practicle purpose.
Definition: libraries/cepgenerator/ActionGenerator.h:85
ActionGenerator(QString xmlFileName, QString licence)
virtual void setXmlFileName(QString xmlFileName)
STL namespace.
bool hasParameters
Does the action have parameters stored as properties ?
Definition: applications/wizard-old/ActionGenerator.h:81
QDir devDirectoryName
Where to store the produced files.
Definition: applications/wizard-old/ActionGenerator.h:74
QMap< QString, QPair< QString, QString > > parameters
List containing all parameters of the action stored as properties of theAction For practical reasons...
Definition: applications/wizard-old/ActionGenerator.h:90
virtual void writeCFile()
virtual void writeHFile()
QFileInfo xmlFileName
Where to find the XML description of the Action.
Definition: applications/wizard-old/ActionGenerator.h:71
std::auto_ptr< coreschema::Action > theAction
XML DOM Element create by CodeSynthesis This action contains all of the informations of the xml file...
Definition: applications/wizard-old/ActionGenerator.h:68
virtual void setDevDirectoryName(QString devDirectoryName)
bool isItkFilter
Definition: libraries/cepgenerator/ActionGenerator.h:93
set(CAMITK_TEST_COMMAND_FILE ${CAMITK_TEST_OUTPUT_DIR}/command) set(CAMITK_TEST_COMMAND_RESULT_FILE $
This CMake file run a command and put the output in a given file.
Definition: CamiTKTestPassFile.h:11
std::set< QString > additionalIncludes
Set of additional files to include.
Definition: applications/wizard-old/ActionGenerator.h:93
virtual void writeImplementationFile()
Definition: ExtensionWindow.h:39
TODO Celine comment here please.
Definition: libraries/cepgenerator/ActionGenerator.h:52