COVISE Core
coConfigSchemaInfos.h
Go to the documentation of this file.
1/* This file is part of COVISE.
2
3 You can use it under the terms of the GNU Lesser General Public License
4 version 2.1 or later, see lgpl-2.1.txt.
5
6 * License: LGPL 2+ */
7
8#ifndef CONFIGSCHEMAINFOS
9#define CONFIGSCHEMAINFOS
10
11// #include <config/coConfigSchema.h>
12#include <util/coTypes.h>
13#include <QString>
14#include <QRegExp>
15#include <QHash>
16#include <QList>
17#include <QStringList>
18
19// holds the data for one attribute
20
21namespace covise
22{
23
24typedef struct
25{
27 QString defaultValue, readableRule, regularExpressionString, attrDescription;
28} attrData;
29
31{
32 friend class coConfigSchema; // needs all the setter methods
33public:
36
37 const QString &getElement(); // real name
38 const QString &getElementPath();
39 const QString &getElementName(); // shown name
40 const QString &getElementDescription();
41 const QString &getElementGroup(); // group to that the element belongs
42 QStringList getElementAllowedChildren();
43 QList<QString> getAttributes(); // list of all attributes for this element
44 // pointer to the attribute data
45 attrData *getAttributeData(const QString &attribute);
46
47private:
48 void setElement(const QString &name);
49 void setReadableElementRule(const QString &rule);
50 void setElementPath(const QString &path);
51 void setElementName(const QString &name);
52 void setElementDescription(const QString &elDescription);
53 void setElementGroup(const QString &group);
54 void setAllowedChildren(QStringList children);
55 void addAttribute(const QString &attr, bool required, const QString &defValue, const QString &readableRule = 0,
56 const QString &regExpressionString = 0, const QString &attrDescription = 0);
57
58 QString element, elementPath, readableElementRule, elementName, elementDescription, elementGroup;
59 QStringList allowedChildren;
60 QHash<QString, attrData> attributes;
61};
62}
63#endif
#define CONFIGEXPORT
Definition: coExport.h:367
GLsizei const GLchar ** path
Definition: khronos-glext.h:7952
GLboolean GLuint group
Definition: khronos-glext.h:12389
GLuint const GLchar * name
Definition: khronos-glext.h:6722
list of all chemical elements
Definition: coConfig.h:27
Definition: coConfigSchemaInfos.h:25
QString attrDescription
Definition: coConfigSchemaInfos.h:27
bool required
Definition: coConfigSchemaInfos.h:26
Definition: coConfigSchemaInfos.h:31
QStringList allowedChildren
Definition: coConfigSchemaInfos.h:59
QHash< QString, attrData > attributes
Definition: coConfigSchemaInfos.h:60
QString element
Definition: coConfigSchemaInfos.h:58
Definition: coConfigSchema.h:35