|
__str__(self)
|
|
__init__(self,
name='NoName',
parent=None,
elementType=None,
objects=None,
childrenName=None,
setClass=<class MolKit.tree.TreeNodeSet at 0xb7c793bc>,
childrenSetClass=<class MolKit.tree.TreeNodeSet at 0xb7c793bc>,
top=None,
childIndex=None,
assignUniqIndex=1)
TreeNode constructor.
|
|
deleteSubTree(self)
Function to actually delete all the reference to a TreeNode to
Free the memory !!!!
|
|
adopt(self,
child,
index=None,
assignUniqIndex=1,
setChildrenTop=0)
Have a parent node adopt a child node
|
|
makeNameUniq(self,
aliasList=None)
None <- makeNameUniq() checks that each name in self.children
is unique.
|
|
assignUniqIndex(self)
|
|
remove(self,
child,
assignUniqIndex=1,
cleanup=0)
remove a child
|
|
__eq__(self,
other)
compare 2 tree nodes by comparing their address in memory
|
|
__ne__(self,
other)
compare 2 tree nodes by comparing their address in memory
|
|
__cmp__(self,
other)
compare 2 tree nodes by comparing their address in memory
|
|
__hash__(self)
return a hash value for this object
|
|
compare(self,
one,
other)
compare 2 tree nodes
|
|
__repr__(self)
|
|
getRoot(self)
returns the root of the tree this node belongs to
|
|
getParentOfType(self,
what)
return first parent of a givent type
|
|
findLevels(self,
lastLevel=None)
goes down the tree until the children member is empty and return
the class type of objects in children
|
|
findType(self,
_what,
uniq=0)
go down the tree until we find Nodes of the given type
|
|
isAbove(self,
Klass)
go down the tree until we find Nodes of the given type return the
number of level above self at which we find Klass, else 0 is
retuned
|
|
isBelow(self,
Klass)
go up the tree until we find Nodes of the given type return the
number of level above self at which we find Klass, else 0 is
retuned
|
|
get(self,
function)
select elements among the children of that node using a lambda
function
|
|
dump(self)
print out all members and their values
|
|
full_name(self)
Build the node's name by concatenating all names up to the
root
|
|
NodesFromName(self,
name)
retrieves nodes using a name.
|
|
getPrevious(self)
Get the previous TreeNode in a TreeNodeSet
|
|
getNext(self)
Gets the next TreeNode in a TreeNodeSet
|
|
merge(self,
right)
Merges two tree objects by creating a new object that is a copy of
the first object but has the children of both of the merged objects
as its children.
|
|
_copyNode(self,
node,
copyDict,
nameExt)
|
|
split(self,
nodes,
nameExt='_copy1')
|