Envision
A visual programming IDE for object-oriented languages
|
Public Member Functions | |
CompositeNode (const CompositeNode &other) | |
CompositeNode (Node *parent, AttributeChain &metaData) | |
CompositeNode (Node *parent, PersistentStore &store, bool partialHint) | |
CompositeNode (Node *parent, PersistentStore &store, bool partialHint, AttributeChain &metaData) | |
CompositeNode (Node *parent=nullptr) | |
virtual | ~CompositeNode () |
virtual QList< Node * > | children () const override |
virtual CompositeNode * | clone () const override |
Node * | comment () const |
this is part of the expansion of the macro ATTRIBUTE(Model::Node, comment, setComment) but we can not include nodeMacros.h More... | |
template<typename ExtensionType > | |
std::unique_ptr< ExtensionType > | extension () |
Node * | get (const CompositeIndex &attributeIndex) const |
Node * | get (const QString &attributeName) const |
QList< QPair< QString, Node * > > | getAllAttributes (bool includeNullValues=false) |
bool | hasAttribute (const QString &attributeName) |
CompositeIndex | indexOf (const QString &nodeName) const |
CompositeIndex | indexOf (Node *node) const |
virtual void | load (PersistentStore &store) override |
const AttributeChain & | meta () |
void | remove (const CompositeIndex &attributeIndex) |
Removes an optional node or replaces a non-optional child node with a default constructed node. More... | |
void | remove (Node *childNode) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Removes an optional node or replaces a non-optional child node with a default constructed node. More... | |
void | remove (QString childNodeName) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Removes an optional node or replaces a non-optional child node with a default constructed node. More... | |
virtual bool | replaceChild (Node *child, Node *replacement) override |
virtual void | save (PersistentStore &store) const override |
void | set (const CompositeIndex &attributeIndex, Node *node) |
void | setComment (Node *node) |
this is part of the expansion of the macro ATTRIBUTE(Model::Node, comment, setComment) but we can not include nodeMacros.h More... | |
Node * | setDefault (QString nodeName) |
Sets a child node to a newly constructed default node of the child's type and returns the new node. More... | |
Static Public Member Functions | |
static CompositeNode * | createDefaultInstance (Node *parent) |
static AttributeChain & | getMetaData () |
static int | registerExtensionId () |
static CompositeIndex | registerNewAttribute (const Attribute &attribute) |
template<typename Extension > | |
static void | registerNewExtension () |
Protected Member Functions | |
virtual AttributeChain & | topLevelMeta () |
Static Protected Member Functions | |
static CompositeIndex | registerNewAttribute (AttributeChain &metaData, const Attribute &attribute) |
static CompositeIndex | registerNewAttribute (AttributeChain &metaData, const QString &attributeName, const QString &attributeType, bool canBePartiallyLoaded, bool isOptional, bool isPersistent) |
Private Member Functions | |
void | checkOrCreateMandatoryAttributes (bool useUndoableAction) |
Checks that all mandatory atrributes are present and creates missing empty lists. More... | |
void | removeAllNodes () |
Static Private Member Functions | |
static CompositeIndex | addAttributeToInitialRegistrationList_ (CompositeIndex &index, const QString &attributeName, const QString &attributeType, bool canBePartiallyLoaded, bool isOptional, bool isPersistent) |
static QList< QPair< CompositeIndex &, Attribute > > & | attributesToRegisterAtInitialization_ () |
Private Attributes | |
AttributeChain & | meta_ |
QVector< QVector< Node * > > | subnodes_ |
Static Private Attributes | |
static bool | AUTOMATICALLY_CREATE_MISSING_REQUIRED_ATTRIBUTES_ON_LOAD_ {true} |
Whether to throw an exception or simply create missing required attributes when loading. More... | |
static CompositeIndex | commentIndex |
this is part of the expansion of the macro ATTRIBUTE(Model::Node, comment, setComment) but we can not include nodeMacros.h More... | |
static int | nextExtensionId_ = 0 |
Additional Inherited Members | |
Protected Types inherited from Core::Reflect< Base > | |
using | Super = Reflect< Base > |
Model::CompositeNode::CompositeNode | ( | Node * | parent, |
AttributeChain & | metaData | ||
) |
Model::CompositeNode::CompositeNode | ( | Node * | parent, |
PersistentStore & | store, | ||
bool | partialHint, | ||
AttributeChain & | metaData | ||
) |
Model::CompositeNode::CompositeNode | ( | Node * | parent = nullptr | ) |
Model::CompositeNode::CompositeNode | ( | Node * | parent, |
PersistentStore & | store, | ||
bool | partialHint | ||
) |
Model::CompositeNode::CompositeNode | ( | const CompositeNode & | other | ) |
|
virtual |
|
staticprivate |
|
staticprivate |
|
private |
Checks that all mandatory atrributes are present and creates missing empty lists.
Only mandatory, missing lists are created as empty lists. If an mandatory attribute of a type other than a list is missing, this method throws an exception.
|
overridevirtual |
|
overridevirtual |
|
inline |
this is part of the expansion of the macro ATTRIBUTE(Model::Node, comment, setComment) but we can not include nodeMacros.h
|
static |
std::unique_ptr< ExtensionType > Model::CompositeNode::extension |
|
inline |
Node * Model::CompositeNode::get | ( | const QString & | attributeName | ) | const |
QList< QPair< QString, Node * > > Model::CompositeNode::getAllAttributes | ( | bool | includeNullValues = false | ) |
|
static |
bool Model::CompositeNode::hasAttribute | ( | const QString & | attributeName | ) |
CompositeIndex Model::CompositeNode::indexOf | ( | const QString & | nodeName | ) | const |
CompositeIndex Model::CompositeNode::indexOf | ( | Node * | node | ) | const |
|
overridevirtual |
|
inline |
|
inlinestatic |
|
staticprotected |
|
staticprotected |
|
static |
|
inlinestatic |
void Model::CompositeNode::remove | ( | const CompositeIndex & | attributeIndex | ) |
Removes an optional node or replaces a non-optional child node with a default constructed node.
The node is specified by the attributeIndex.
void Model::CompositeNode::remove | ( | Node * | childNode | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Removes an optional node or replaces a non-optional child node with a default constructed node.
The node removed is childNode. It must not be null.
void Model::CompositeNode::remove | ( | QString | childNodeName | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Removes an optional node or replaces a non-optional child node with a default constructed node.
The node removed has the name childNodeName. It must not be null.
|
private |
|
overridevirtual |
void Model::CompositeNode::set | ( | const CompositeIndex & | attributeIndex, |
Node * | node | ||
) |
|
inline |
this is part of the expansion of the macro ATTRIBUTE(Model::Node, comment, setComment) but we can not include nodeMacros.h
Node * Model::CompositeNode::setDefault | ( | QString | nodeName | ) |
Sets a child node to a newly constructed default node of the child's type and returns the new node.
|
protectedvirtual |
|
staticprivate |
Whether to throw an exception or simply create missing required attributes when loading.
Setting this to false might catch bugs, but will result in new versions being incompatible with old ones
|
staticprivate |
this is part of the expansion of the macro ATTRIBUTE(Model::Node, comment, setComment) but we can not include nodeMacros.h
|
private |
|
staticprivate |
|
private |