50 #ifndef VSI_CONTEXT_HH 51 #define VSI_CONTEXT_HH 55 #include <QStringList> 80 Context (QScriptEngine *_engine);
86 void parse (QByteArray _xml);
89 const QVector<Element *>&
elements ()
const {
return elements_; };
92 QVector<Element *>
elements (QString _category);
110 bool canConvert (QString _type1, QString _type2);
119 static QString
getXmlString (QXmlQuery &_xml, QString _expr, QString _default =
"");
124 void parseElement (QXmlQuery &_xml);
136 bool parseInOutBase (QXmlQuery &_xml,
InOut *_io);
139 QVector <Element *> elements_;
141 QMap <QString, Type*> supportedTypes_;
143 QList <Type *> types_;
145 QScriptEngine *scriptEngine_;
const QVector< Element * > & elements() const
Returns all available elements.
bool typeSupported(QString _type)
Is the given type supported.
QStringList categories()
List of categories.
void parse(QByteArray _xml)
Parse xml content.
Element * element(QString _name)
Returns the element with a given name.
static bool strToBool(QString _str)
Converts the given string to bool.
QScriptEngine * scriptEngine()
Return script engine pointer.
Context(QScriptEngine *_engine)
Constructor.
bool canConvert(QString _type1, QString _type2)
Can the given types be converted to each other.
static QString getXmlString(QXmlQuery &_xml, QString _expr, QString _default="")
Gets the string of a xml query.
void registerType(Type *_type)
Registers a supported datatype.
Type * getType(QString _type)
Get type object for given type name.