Name

PropertyNode — The node of property tree.

Synopsis

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
  double getDouble(bool * = 0) const
  None setString(const SString &) 
  None setBool(bool) 
  None setInt(int) 
  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

Description

PropertyNode construct/copy/destruct

  1. __init__(SernaApiBase * = 0)


  2. __init__(const SString & name, const SString & value = SString())


  3. __init__(const SString & name, bool value)


  4. __init__(const SString & name, int value)


  5. __init__(const SString & name, double value)


  6. __del__()


PropertyNode public member functions

  1. SString name() const

    Get property name.


  2. None setName(const SString & )

    Set (new) property name.


  3. SString getString() const

    Get string value of property.


  4. bool getBool(bool * ok = 0) const

    Get boolean property value.


  5. int getInt(bool * ok = 0) const

    Get integer property value.


  6. double getDouble(bool * ok = 0) const

    Get double property value.


  7. None setString(const SString & value)

    Set (new) string value of property.


  8. None setBool(bool )

    Set boolean value of property.


  9. None setInt(int )

    Set integer value of property.


  10. None setDouble(double )

    Set double value of property.


  11. None merge(const PropertyNode & other, bool override = false)

    Merge values from other property tree into current property tree. Change notifications are currently not sent during merge.


  12. PropertyNode copy(bool recursive = false) const

    Make (possible recursive) copy of this property node.


  13. PropertyNode getProperty(const SString & name) const

    Get child property by slash-delimited path.


  14. PropertyNode getSafeProperty(const SString & name) const

    Safely get child property (never returns NULL, returns empty property).


  15. PropertyNode makeDescendant(const SString & name)

    Makes child property subtree (with path). Returns the leaf.


  16. PropertyNode makeDescendant(const SString & name, const SString & value,                bool override = true)

    Makes child property subtree (with path). Returns the leaf.


  17. None addWatcher(PropertyNodeWatcher * watcher)

    Register watcher for this PropertyNode.


  18. None removeWatcher(PropertyNodeWatcher * watcher)

    Removes watcher.


  19. None removeAllWatchers()

    Removes all watchers.


  20. None dump() const

    Dump PropertyNode.


  21. bool save(const SString & url) const

    Save property tree to the given URL. Returns True on success.


  22. bool read(const SString & url, bool merge = false)

    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.


  23. PY_List children()

    Returns the python list of children.


  24. PropertyNode firstChild() const


  25. PropertyNode lastChild() const


  26. PropertyNode getChild(int n) const


  27. int countChildren() const


  28. None appendChild(const PropertyNode & )


  29. None removeAllChildren()


  30. PropertyNode nextSibling() const


  31. PropertyNode prevSibling() const


  32. PropertyNode parent() const


  33. PropertyNode root() const


  34. None remove()


  35. None insertBefore(const PropertyNode & )


  36. None insertAfter(const PropertyNode & )


  37. None removeGroup(const PropertyNode & )


  38. int siblingIndex() const


  39. SString getTreelocString(const PropertyNode & = PropertyNode()) const


  40. PropertyNode getByTreelocString(const SString & ) const