Package logilab-common-0 :: Package 36 :: Package 1 :: Module tree
[frames] | no frames]

Module tree

source code

Base class to represent a tree structure.

:copyright: 2000-2008 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
:contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr
:license: General Public License version 2 - http://www.gnu.org/licenses

Classes
  NodeNotFound
raised when a node has not been found
  Node
a basic tree node, caracterised by an id
  VNode
a visitable node...
  BinaryNode
a binary node (ie only two children...
  ListNode
Used to manipulate Nodes as Lists...
  PostfixedDepthFirstIterator
a postfixed depth first iterator, designed to be used with visitors...
  PrefixedDepthFirstIterator
a pretfixed depth first iterator, designed to be used with visitors...
Functions
 
post_order_list(node, filter_func=no_filter)
create a list with tree nodes for which the <filter> function returned true...
source code
 
pre_order_list(node, filter_func=no_filter)
create a list with tree nodes for which the <filter> function returned true...
source code
Variables
  EX_SIBLING_NOT_FOUND = "No such sibling as '%s'"
  EX_CHILD_NOT_FOUND = "No such child as '%s'"
  EX_NODE_NOT_FOUND = "No such node as '%s'"
  list_class = UserList
Function Details

post_order_list(node, filter_func=no_filter)

source code 

create a list with tree nodes for which the <filter> function returned true
in a post order fashion

pre_order_list(node, filter_func=no_filter)

source code 

create a list with tree nodes for which the <filter> function returned true
in a pre order fashion