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

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. void * getPtr(bool * ok = 0) const

    Get pointer property value.


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

    Get double property value.


  8. None setString(const SString & value)

    Set (new) string value of property.


  9. None setBool(bool )

    Set boolean value of property.


  10. None setInt(int )

    Set integer value of property.


  11. None setPtr(void * )

    Set pointer value of property.


  12. None setDouble(double )

    Set double value of property.


  13. 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.


  14. PropertyNode copy(bool recursive = false) const

    Make (possible recursive) copy of this property node.


  15. PropertyNode getProperty(const SString & name) const

    Get child property by slash-delimited path.


  16. PropertyNode getSafeProperty(const SString & name) const

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


  17. PropertyNode makeDescendant(const SString & name)

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


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

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


  19. None addWatcher(PropertyNodeWatcher * watcher)

    Register watcher for this PropertyNode.


  20. None removeWatcher(PropertyNodeWatcher * watcher)

    Removes watcher.


  21. None removeAllWatchers()

    Removes all watchers.


  22. None dump() const

    Dump PropertyNode.


  23. bool save(const SString & url) const

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


  24. 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.


  25. PY_List children()

    Returns the python list of children.


  26. PropertyNode firstChild() const


  27. PropertyNode lastChild() const


  28. PropertyNode getChild(int n) const


  29. int countChildren() const


  30. None appendChild(const PropertyNode & )


  31. None removeAllChildren()


  32. PropertyNode nextSibling() const


  33. PropertyNode prevSibling() const


  34. PropertyNode parent() const


  35. PropertyNode root() const


  36. None remove()


  37. None insertBefore(const PropertyNode & )


  38. None insertAfter(const PropertyNode & )


  39. None removeGroup(const PropertyNode & )


  40. int siblingIndex() const


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


  42. PropertyNode getByTreelocString(const SString & ) const