Developer Documentation
|
#include <Plugin-VSI/parser/context.hh>
Public Member Functions | |
Context (LoggingInterface *_loggingInterface, PythonInterface *_pythonInterface) | |
Constructor. More... | |
~Context () | |
Destructor. More... | |
void | parse (QFile &_xml) |
Parse xml content. More... | |
const QVector< Element * > & | elements () const |
Returns all available elements. More... | |
QVector< Element * > | elements (const QString &_category) |
Returns all available elements for a given category. More... | |
Element * | element (const QString &_name) |
Returns the element with a given name. More... | |
QStringList | categories () |
List of categories. More... | |
void | registerType (Type *_type) |
Registers a supported datatype. More... | |
bool | typeSupported (const QString &_type) |
Is the given type supported. More... | |
Type * | getType (const QString &_type) |
Get type object for given type name. More... | |
bool | canConvert (const QString &_type1, const QString &_type2) |
Can the given types be converted to each other. More... | |
void | executeScript (const QString &_script) |
void | openScriptInEditor (const QString &_script) |
Static Public Member Functions | |
static bool | strToBool (const QString &_str) |
Converts the given string to bool. More... | |
static QString | getXmlString (QDomElement &_element, const QString &_tag, QString _default="") |
Gets the string of a xml query. More... | |
static QString | removeCommonTrailingSpaces (const QString &in) |
Removes trailing spaces from string which are present in each line - relative trailing spaces are not removed. More... | |
Private Member Functions | |
void | parseElement (QDomElement &_element) |
parse element from xml More... | |
Input * | parseInput (QDomElement &_domElement, Element *_e) |
Output * | parseOutput (QDomElement &_domElement, Element *_e) |
Function * | parseFunction (QDomElement &_domElement, Element *_e) |
bool | parseInOutBase (QDomElement &_domElement, InOut *_io) |
Private Attributes | |
QVector< Element * > | elements_ |
QMap< QString, Type * > | supportedTypes_ |
QList< Type * > | types_ |
LoggingInterface * | loggingInterface_ |
PythonInterface * | pythonInterface_ |
Class holding all the informations / parsed xml metadata for the visual scripting interface
Definition at line 71 of file context.hh.
|
explicit |
Constructor.
Definition at line 76 of file context.cc.
VSI::Context::~Context | ( | ) |
Destructor.
Definition at line 132 of file context.cc.
bool VSI::Context::canConvert | ( | const QString & | _type1, |
const QString & | _type2 | ||
) |
Can the given types be converted to each other.
Definition at line 560 of file context.cc.
QStringList VSI::Context::categories | ( | ) |
List of categories.
Definition at line 166 of file context.cc.
Element * VSI::Context::element | ( | const QString & | _name | ) |
Returns the element with a given name.
Definition at line 155 of file context.cc.
|
inline |
Returns all available elements.
Definition at line 84 of file context.hh.
QVector< Element * > VSI::Context::elements | ( | const QString & | _category | ) |
Returns all available elements for a given category.
Definition at line 143 of file context.cc.
void VSI::Context::executeScript | ( | const QString & | _script | ) |
Definition at line 632 of file context.cc.
Type * VSI::Context::getType | ( | const QString & | _type | ) |
Get type object for given type name.
Definition at line 571 of file context.cc.
|
static |
Gets the string of a xml query.
Gets the string of a tag or returns the default.
Definition at line 514 of file context.cc.
void VSI::Context::openScriptInEditor | ( | const QString & | _script | ) |
Definition at line 636 of file context.cc.
void VSI::Context::parse | ( | QFile & | _xml | ) |
|
private |
parse element from xml
Definition at line 204 of file context.cc.
Definition at line 400 of file context.cc.
|
private |
Definition at line 370 of file context.cc.
Definition at line 312 of file context.cc.
Definition at line 353 of file context.cc.
void VSI::Context::registerType | ( | Type * | _type | ) |
Registers a supported datatype.
Definition at line 541 of file context.cc.
|
static |
Removes trailing spaces from string which are present in each line - relative trailing spaces are not removed.
Definition at line 588 of file context.cc.
|
static |
Converts the given string to bool.
Definition at line 530 of file context.cc.
bool VSI::Context::typeSupported | ( | const QString & | _type | ) |
Is the given type supported.
Definition at line 552 of file context.cc.
|
private |
Definition at line 140 of file context.hh.
|
private |
Definition at line 146 of file context.hh.
|
private |
Definition at line 147 of file context.hh.
|
private |
Definition at line 142 of file context.hh.
|
private |
Definition at line 144 of file context.hh.