add a create-flag to the node() method of a PropertyObject,
defaulting to false to maintain existing behaviour.
This could be used to add a listener to a non-existing property
without having to write a dummy-value beforehand.
Usage:
myPropertyObject->node() returns the corresponding node or NULL if
does not exist or has not been accessed before.
myPropertyObject->node(true) returns the corresponding node, never NULL.
If the property does not exist, it will gets created.
#undef SG_DEF_ASSIGN_OP
- SGPropertyNode* node() const
+ SGPropertyNode* node(bool aCreate = false) const
{
- return PropertyObjectBase::node(false);
+ return PropertyObjectBase::node(aCreate);
}
}; // of template PropertyObject