PropertyNode — The node of property tree.
class PropertyNode : (RefCountedWrappedObjectSernaApi::RefCountedWrappedObject) : # construct/copy/destruct __init__(SernaApiBase * = 0) __init__(const SString &, const SString & = SString()) __init__(const SString &, bool) __init__(const SString &, int) __init__(const SString &, double) __del__() # public member functions SString name() const None setName(const SString &) SString getString() const bool getBool(bool * = 0) const int getInt(bool * = 0) const void * getPtr(bool * = 0) const double getDouble(bool * = 0) const None setString(const SString &) None setBool(bool) None setInt(int) None setPtr(void *) None setDouble(double) None merge(const PropertyNode &, bool = false) PropertyNode copy(bool = false) const PropertyNode getProperty(const SString &) const PropertyNode getSafeProperty(const SString &) const PropertyNode makeDescendant(const SString &) PropertyNode makeDescendant(const SString &, const SString &, bool = true) None addWatcher(PropertyNodeWatcher *) None removeWatcher(PropertyNodeWatcher *) None removeAllWatchers() None dump() const bool save(const SString &) const bool read(const SString &, bool = false) PY_List children() PropertyNode firstChild() const PropertyNode lastChild() const PropertyNode getChild(int) const int countChildren() const None appendChild(const PropertyNode &) None removeAllChildren() PropertyNode nextSibling() const PropertyNode prevSibling() const PropertyNode parent() const PropertyNode root() const None remove() None insertBefore(const PropertyNode &) None insertAfter(const PropertyNode &) None removeGroup(const PropertyNode &) int siblingIndex() const SString getTreelocString(const PropertyNode & = PropertyNode()) const PropertyNode getByTreelocString(const SString &) const
PropertyNode
public member functionsSString name() const
Get property name.
Set (new) property name.
SString getString() const
Get string value of property.
Get boolean property value.
Get integer property value.
Get pointer property value.
Get double property value.
Set (new) string value of property.
Set boolean value of property.
Set integer value of property.
Set pointer value of property.
Set double value of property.
Merge values from other property tree into current property tree. Change notifications are currently not sent during merge.
PropertyNode copy(bool recursive = false) const
Make (possible recursive) copy of this property node.
PropertyNode getProperty(const SString & name) const
Get child property by slash-delimited path.
PropertyNode getSafeProperty(const SString & name) const
Safely get child property (never returns NULL, returns empty property)
PropertyNode makeDescendant(const SString & name)
Makes child property subtree (with path). Returns the leaf.
PropertyNode makeDescendant(const SString & name, const SString & value, bool override = true)
Makes child property subtree (with path). Returns the leaf.
Register watcher for this PropertyNode.
Removes watcher.
Removes all watchers.
Dump PropertyNode.
Save property tree to the given URL. Returns True on success.
Read property tree from the URL. If the merge attribute is false, then contents of the current property node are discarded; otherwise, existing property tree is merged with one which were read from file.
Returns the python list of children.
PropertyNode firstChild() const
PropertyNode lastChild() const
PropertyNode getChild(int n) const
PropertyNode nextSibling() const
PropertyNode prevSibling() const
PropertyNode parent() const
PropertyNode root() const
SString getTreelocString(const PropertyNode & = PropertyNode()) const
PropertyNode getByTreelocString(const SString & ) const