Computer Assited Medical Intervention Tool Kit  version 3.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
ParameterGenerator.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 PARAMETERGENERATOR_H
26 #define PARAMETERGENERATOR_H
27 
28 #if defined(_WIN32) && !defined(__MINGW32__) // MSVC only
29 #pragma warning( disable : 4290 )
30 #endif // MSVC only
31 
32 
33 // includes from Qt
34 #include <QString>
35 #include <QMap>
36 
37 namespace cepcoreschema
38 {
39 class Parameter;
40 }
41 
50 {
51 public:
52  typedef enum {
53  INT,
66 
67  ParameterGenerator(cepcoreschema::Parameter & domParameter);
68 
69  QString getDefaultValue() const;
70  QString getName() const;
72  QString getCppName() const;
73  QString getType() const;
74  bool isEditable() const;
75  bool needsAdditionalInclude() const;
76  QString getAdditionalInclude() const;
77  QString getQVariantConversion() const;
78  QString getPropertyQVariant() const;
79  QString getToString() const;
80 
81  static QString getTypeDefaultValue(QString typeName);
82 
83 private:
84  bool editable;
85  QString name;
86  QString defaultValue;
88 
89  static QMap<ParameterGenerator::ParameterTypeGenerator, QString> & getTypeNames();
90  static QMap<ParameterGenerator::ParameterTypeGenerator, QString> & getDefaultValues();
91 
92  static void initNamesAndValues();
93 };
94 
95 #endif
QString getAdditionalInclude() const
static QMap< ParameterGenerator::ParameterTypeGenerator, QString > & getTypeNames()
Definition: ParameterGenerator.h:58
static void initNamesAndValues()
static QMap< ParameterGenerator::ParameterTypeGenerator, QString > & getDefaultValues()
Definition: ParameterGenerator.h:59
QString defaultValue
Definition: ParameterGenerator.h:86
bool needsAdditionalInclude() const
bool editable
Definition: ParameterGenerator.h:84
Definition: ParameterGenerator.h:63
Definition: ParameterGenerator.h:55
ParameterTypeGenerator
Definition: ParameterGenerator.h:52
QString getType() const
Definition: ParameterGenerator.h:57
Definition: ParameterGenerator.h:62
Definition: ParameterGenerator.h:53
Definition: ParameterGenerator.h:60
static QString getTypeDefaultValue(QString typeName)
Definition: ParameterGenerator.h:56
Definition: ActionExtensionGenerator.h:36
QString getQVariantConversion() const
QString getToString() const
ParameterTypeGenerator type
Definition: ParameterGenerator.h:87
Definition: ParameterGenerator.h:54
bool isEditable() const
QString getDefaultValue() const
QString name
Definition: ParameterGenerator.h:85
QString getPropertyQVariant() const
ParameterGenerator(cepcoreschema::Parameter &domParameter)
QString getCppName() const
create a name that can be used as C++ variable name (remove all white space)
TODO Celine comment here pl.
Definition: ParameterGenerator.h:49
Definition: ParameterGenerator.h:64
QString getName() const
Definition: ParameterGenerator.h:61