Method summary
- __init__(self, klass)
- add_child(self, child)
- add_parent(self, parent)
- get_ancestors(self)
- get_level(self)
Methods
- __init__(self, klass)
Given a class, create a node in the tree.
Parameters
klass : class
The class which is represented as a node in the tree.
- add_child(self, child)
Add a child node.
- add_parent(self, parent)
Add a parent node.
- get_ancestors(self)
Returns a list of ancestor nodes from which this class has descended.
- get_level(self)
Returns the inheritance level of the node (an int). If the level has not been set, the method computes it. Note however, that this computation will fail if the parent information is incorrect.