10 #ifndef NCLSTRUCTURE_H
11 #define NCLSTRUCTURE_H
13 #include "NCLLanguageProfile_global.h"
17 #include <QTextStream>
18 #include <QtScript/QScriptValue>
19 #include <QtScript/QScriptEngine>
22 #include <QStringList>
25 #include <util/AttributeReferences.h>
26 using namespace composer::util;
27 #include <core/util/Singleton.h>
29 #define NCLSTRUCTURE_FILE ":/config/NCL_STRUCTURE"
42 map <QString, map <QString, bool> *> *attributes;
43 map <QString, deque <QString> *> *attributes_ordered;
44 map <QString, map <QString, char> *> *nesting;
45 map <QString, QString > *dataTypes;
47 map <QString, QStringList> *dataTypeDefaultSuggestions;
48 map <QString, map <QString, QString> *> *attributesDatatype;
49 QMultiMap <QString, AttributeReferences* > *references;
50 map <QString, bool> define_scope;
68 vector <QString> parseLine(QString line);
90 void addElement (QString name, QString father,
char cardinality,
91 bool define_scope =
false);
100 void addAttribute (QString element,
113 void addReference (QString element,
122 void addDatatype( QString datatype,
125 void addDatatypeDefaultSuggestions(QString datatype, QString values);
127 QStringList getDatatypeDefaultSuggestions(QString datatype);
133 map <QString, map <QString, char> *> *getNesting();
140 map <QString, bool> *getAttributes (QString element);
147 deque <QString> *getAttributesOrdered (QString element);
154 map <QString, char> *getChildren (QString tagname);
162 vector <AttributeReferences *> getReferences (QString element, QString attr);
168 QString getAttributeDatatype(QString element, QString name);
173 bool defineScope(QString tagname);
178 #endif // NCLSTRUCTURE_H