

Public Member Functions | |
| def | __init__ |
| def | __cmp__ |
| def | __repr__ |
| def | toString |
| def | addChild |
| def | removeChild |
| def | removeAllChildren |
| def | getChildren |
| def | setContent |
| def | getContent |
| def | dropContent |
| def | searchChildren |
| def | listDepthFirst |
| def | listByHeight |
| def | searchContent |
| def | searchPathToContent |
| def | display |
Public Attributes | |
| content | |
| children | |
Definition at line 220 of file dataUtils.py.
| def dataUtils::Node::__cmp__ | ( | self, | ||
| other | ||||
| ) | [inherited] |
Definition at line 41 of file dataUtils.py.
| def dataUtils::NodeExample::__init__ | ( | self, | ||
newContent = None | ||||
| ) |
Creates an empty node with no child node.
Reimplemented from dataUtils::Node.
Definition at line 222 of file dataUtils.py.
| def dataUtils::Node::__repr__ | ( | self | ) | [inherited] |
| def dataUtils::Node::addChild | ( | self, | ||
| aChild | ||||
| ) | [inherited] |
| def dataUtils::Node::display | ( | self | ) | [inherited] |
Definition at line 215 of file dataUtils.py.
| def dataUtils::Node::dropContent | ( | self | ) | [inherited] |
| def dataUtils::Node::getChildren | ( | self | ) | [inherited] |
| def dataUtils::Node::getContent | ( | self | ) | [inherited] |
| def dataUtils::Node::listByHeight | ( | self, | ||
first = True | ||||
| ) | [inherited] |
Walks the tree height by height, starting from root node, and returns the list of encountered nodes.
Definition at line 164 of file dataUtils.py.
| def dataUtils::Node::listDepthFirst | ( | self | ) | [inherited] |
Walks the tree depth-first, returns the list of encountered nodes.
Definition at line 153 of file dataUtils.py.
| def dataUtils::Node::removeAllChildren | ( | self | ) | [inherited] |
Definition at line 119 of file dataUtils.py.
| def dataUtils::Node::removeChild | ( | self, | ||
| child | ||||
| ) | [inherited] |
Removes specified child, raises an exception if child not found.
Definition at line 114 of file dataUtils.py.
| def dataUtils::Node::searchChildren | ( | self, | ||
| content | ||||
| ) | [inherited] |
Searches through node's children the first, if any, that has specified content.
Definition at line 145 of file dataUtils.py.
| def dataUtils::Node::searchContent | ( | self, | ||
| content | ||||
| ) | [inherited] |
Searches through internal content and then recursively through children for specified content.Returns the first node found having the content, if any. Otherwise, returns None. content -> list of nodes
Definition at line 178 of file dataUtils.py.
| def dataUtils::Node::searchPathToContent | ( | self, | ||
| content | ||||
| ) | [inherited] |
Returns, if possible, the path from the first found node whose content matches specified content to root node.
Definition at line 196 of file dataUtils.py.
| def dataUtils::Node::setContent | ( | self, | ||
| nodeContent | ||||
| ) | [inherited] |
Sets a new content to current node, which must not have already a content.
Definition at line 128 of file dataUtils.py.
| def dataUtils::Node::toString | ( | self, | ||
offset = 0, |
||||
nextOffset = 0, |
||||
isFirstChild = True | ||||
| ) | [inherited] |
Returns a stringified description of the tree.
__ a __ b
|_ c __ d __ e
|_ f
|_ g
offset is the current position where to write
nexOffset is the position where children should begin
Definition at line 61 of file dataUtils.py.
dataUtils::Node::children [inherited] |
Definition at line 38 of file dataUtils.py.
1.5.8