umbrello/umbrello
#include <petalnode.h>
Classes | |
struct | StringOrNode |
Public Types | |
typedef QPair< QString, StringOrNode > | NameValue |
typedef QList< NameValue > | NameValueList |
enum | NodeType { nt_object, nt_list } |
Public Member Functions | |
PetalNode (NodeType nt) | |
virtual | ~PetalNode () |
NameValueList | attributes () const |
QString | documentation () const |
StringOrNode | findAttribute (const QString &name) const |
QStringList | initialArgs () const |
QString | name () const |
void | setAttributes (NameValueList vl) |
void | setInitialArgs (const QStringList &args) |
NodeType | type () const |
Friends | |
QDebug | operator<< (QDebug out, const PetalNode &p) |
Detailed Description
Rose petal node - parse tree for model import.
A Rose petal node can be of type:
- object - initialArgs() contains the object type name and further initial arguments which depend on the exact object type
- subordinate attributes are contained in attributes()
- list - initialArgs() contains the list type name
- list elements are contained in attributes() but the name of each NameValue is empty.
- value - not represented as a node, instead the stripped down value is saved in the value string of the NameValue. Example: for the input (value Text "This is some text") the following is saved in the value string of the NameValue: "This is some text"
Definition at line 39 of file petalnode.h.
Member Typedef Documentation
Definition at line 55 of file petalnode.h.
Definition at line 56 of file petalnode.h.
Member Enumeration Documentation
enum PetalNode::NodeType |
Enumerator | |
---|---|
nt_object | |
nt_list |
Definition at line 58 of file petalnode.h.
Constructor & Destructor Documentation
|
explicit |
Definition at line 74 of file petalnode.cpp.
|
virtual |
Definition at line 79 of file petalnode.cpp.
Member Function Documentation
PetalNode::NameValueList PetalNode::attributes | ( | ) | const |
Definition at line 117 of file petalnode.cpp.
QString PetalNode::documentation | ( | ) | const |
Return the documentation from a petal node with carriage return handling and removed surrounding quotation marks if present.
Definition at line 105 of file petalnode.cpp.
PetalNode::StringOrNode PetalNode::findAttribute | ( | const QString & | name | ) | const |
Find an attribute by name.
- Returns
- The value of the attribute. StringOrNode::isEmpty() returns true if the name could not be found.
Definition at line 144 of file petalnode.cpp.
QStringList PetalNode::initialArgs | ( | ) | const |
Definition at line 88 of file petalnode.cpp.
QString PetalNode::name | ( | ) | const |
Definition at line 93 of file petalnode.cpp.
void PetalNode::setAttributes | ( | PetalNode::NameValueList | vl | ) |
Definition at line 134 of file petalnode.cpp.
void PetalNode::setInitialArgs | ( | const QStringList & | args | ) |
Definition at line 129 of file petalnode.cpp.
PetalNode::NodeType PetalNode::type | ( | ) | const |
Definition at line 83 of file petalnode.cpp.
Friends And Related Function Documentation
Definition at line 153 of file petalnode.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:40:28 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.