umbrello: PetalNode Class Reference

umbrello 25.08.0 Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology

Classes | Public Types | Public Member Functions | Private Attributes | Friends | List of all members
PetalNode Class Reference

`#include <petalnode.h>`

## Classes
struct | StringOrNode

## Public Types
enum | NodeType { nt_object , nt_list }
typedef QPair< QString, StringOrNode > | NameValue
typedef QList< NameValue > | NameValueList

## Public Member Functions
| PetalNode (NodeType nt)
virtual | ~PetalNode ()
NodeType | type () const
QStringList | initialArgs () const
QString | name () const
QString | viewTag () const
QString | documentation () const
NameValueList | attributes () const
void | setInitialArgs (const QStringList &args)
void | setAttributes (NameValueList vl)
StringOrNode | findAttribute (const QString &name) const

## Private Attributes
NodeType | m_type
QStringList | m_initialArgs
NameValueList | m_attributes

## 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"

Author
  Oliver Kellogg Bugs and comments to umbre.nosp@m.llo-.nosp@m.devel.nosp@m.@kde.nosp@m..org or https://bugs.kde.org

## Member Typedef Documentation

## ◆ NameValue

typedef QPair<QString, StringOrNode> PetalNode::NameValue

## ◆ NameValueList

typedef QList<NameValue> PetalNode::NameValueList

## Member Enumeration Documentation

## ◆ NodeType

enum PetalNode::NodeType

Enumerator
nt_object |
nt_list |

## Constructor & Destructor Documentation

## ◆ PetalNode()

PetalNode::PetalNode | ( | NodeType | nt | ) |
| explicit

## ◆ ~PetalNode()

PetalNode::~PetalNode | ( |  | ) |
| virtual

## Member Function Documentation

## ◆ attributes()

PetalNode::NameValueList PetalNode::attributes | ( |  | ) | const

## ◆ documentation()

QString PetalNode::documentation | ( |  | ) | const

Return the documentation from a petal node with carriage return handling and removed surrounding quotation marks if present.

## ◆ findAttribute()

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.

## ◆ initialArgs()

QStringList PetalNode::initialArgs | ( |  | ) | const

## ◆ name()

QString PetalNode::name | ( |  | ) | const

## ◆ setAttributes()

void PetalNode::setAttributes | ( | PetalNode::NameValueList | vl | ) |

## ◆ setInitialArgs()

void PetalNode::setInitialArgs | ( | const QStringList & | args | ) |

## ◆ type()

PetalNode::NodeType PetalNode::type | ( |  | ) | const

## ◆ viewTag()

QString PetalNode::viewTag | ( |  | ) | const

## Friends And Related Symbol Documentation

## ◆ operator<<

QDebug operator<< | ( | QDebug | out,
|  | const PetalNode & | p )
| friend

## Member Data Documentation

## ◆ m_attributes

NameValueList PetalNode::m_attributes
| private

## ◆ m_initialArgs

QStringList PetalNode::m_initialArgs
| private

## ◆ m_type

NodeType PetalNode::m_type
| private

The documentation for this class was generated from the following files:

- umbrello/petalnode.h
- umbrello/petalnode.cpp