|
Developer Documentation
|
#include <Plugin-VSI/parser/context.hh>
Public Member Functions | |
| Context (LoggingInterface *_loggingInterface, PythonInterface *_pythonInterface) | |
| Constructor. | |
| ~Context () | |
| Destructor. | |
| void | parse (QFile &_xml) |
| Parse xml content. | |
| const QVector< Element * > & | elements () const |
| Returns all available elements. | |
| QVector< Element * > | elements (const QString &_category) |
| Returns all available elements for a given category. | |
| Element * | element (const QString &_name) |
| Returns the element with a given name. | |
| QStringList | categories () |
| List of categories. | |
| void | registerType (Type *_type) |
| Registers a supported datatype. | |
| bool | typeSupported (const QString &_type) |
| Is the given type supported. | |
| Type * | getType (const QString &_type) |
| Get type object for given type name. | |
| bool | canConvert (const QString &_type1, const QString &_type2) |
| Can the given types be converted to each other. | |
| 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. | |
| static QString | getXmlString (QDomElement &_element, const QString &_tag, QString _default="") |
| Gets the string of a xml query. | |
| static QString | removeCommonTrailingSpaces (const QString &in) |
| Removes trailing spaces from string which are present in each line - relative trailing spaces are not removed. | |
Private Member Functions | |
| void | parseElement (QDomElement &_element) |
| parse element from xml | |
| 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.