tuchulcha  0.10.1
Graphical Workflow Configuration Editor
MetaData.h
Go to the documentation of this file.
1 /* Copyright (C) 2009 Jens-Malte Gottfried
2 
3  This file is part of Tuchulcha.
4 
5  Tuchulcha is free software: you can redistribute it and/or modify
6  it under the terms of the GNU Lesser General Public License as published by
7  the Free Software Foundation, either version 3 of the License, or
8  (at your option) any later version.
9 
10  Tuchulcha is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU Lesser General Public License for more details.
14 
15  You should have received a copy of the GNU Lesser General Public License
16  along with Tuchulcha. If not, see <http://www.gnu.org/licenses/>.
17 */
23 #ifndef METADATA_H_
24 #define METADATA_H_
25 
26 #include <QStringList>
27 
28 class QParameterFile;
29 
31 class MetaData {
32 public:
34  MetaData(QString fileName);
35  ~MetaData();
36 
38  // \{
40  QStringList getClasses() const;
41 
43 
47  QStringList getOutputs(QString className) const;
48 
50 
54  QStringList getOutputDisplayNames(QString className) const;
55 
57 
61  QStringList getInputs(QString className) const;
62 
64 
68  QStringList getInputDisplayNames(QString className) const;
69 
71 
75  QStringList getParameters(QString className) const;
76 
78 
85  QString getType(QString parName, QString className) const;
86 
88 
92  QString getDefault(QString parName, QString className) const;
93 
95 
99  QString getDocString(QString parName, QString className) const;
100 
102 
106  QString getDocFile(QString parName, QString className) const;
107 
109 
113  bool isInputSlot(QString name, QString className) const;
114 
116 
122  bool isOptionalSlot(QString slotName, QString className) const;
123 
125 
131  bool isMultiSlot(QString slotName, QString className) const;
132 
134 
138  bool isDynamic(QString className) const;
139 
141 
145  QStringList getTags(QString className) const;
146 
147  // \} // queries
148 
149 private:
151  QStringList _classes;
152 
155 };
156 
157 #endif /*METADATA_H_*/
bool isMultiSlot(QString slotName, QString className) const
Check if some slot is a multi slot.
Definition: MetaData.cpp:125
MetaData(QString fileName)
Load metadata from given file.
Definition: MetaData.cpp:28
QString getType(QString parName, QString className) const
Get type of some parameter or slot.
Definition: MetaData.cpp:77
QStringList getParameters(QString className) const
get parameters of some given object
Definition: MetaData.cpp:72
Handle metadata management for ParameterFileModel classes.
Definition: MetaData.h:31
QString getDefault(QString parName, QString className) const
get default value for some editable parameter
Definition: MetaData.cpp:86
bool isOptionalSlot(QString slotName, QString className) const
Check if some slot is optional.
Definition: MetaData.cpp:117
const QParameterFile * _data
used ParameterFile (read only)
Definition: MetaData.h:154
QString getDocString(QString parName, QString className) const
get docstring for some parameter or some class.
Definition: MetaData.cpp:93
Qt implementation for ParameterFile class.
QStringList getInputs(QString className) const
get output slots of some given object
Definition: MetaData.cpp:65
QString getDocFile(QString parName, QString className) const
get filename for some parameter or class documentation.
Definition: MetaData.cpp:102
bool isDynamic(QString className) const
Check if module is dynamic.
Definition: MetaData.cpp:133
QStringList getTags(QString className) const
Get the tags of a given object.
Definition: MetaData.cpp:137
QStringList getOutputDisplayNames(QString className) const
get input slots of some given object
Definition: MetaData.cpp:159
QStringList getInputDisplayNames(QString className) const
get output slots of some given object
Definition: MetaData.cpp:142
QStringList getClasses() const
get classes contained in this metadata file
Definition: MetaData.cpp:55
QStringList getOutputs(QString className) const
get input slots of some given object
Definition: MetaData.cpp:59
QStringList _classes
contained classes
Definition: MetaData.h:151
bool isInputSlot(QString name, QString className) const
Check if some parameter/slot is an input slot.
Definition: MetaData.cpp:111