Package lepl :: Package support :: Module graph :: Class ConstructorWalker
[hide private]
[frames] | no frames]

Class ConstructorWalker

source code


Tree walker (it handles cyclic graphs by ignoring repeated nodes).

This is based directly on the catamorphism of the graph. The visitor encodes the type information. It may help to see the constructor arguments as type constructors.

Nodes should be subclasses of ConstructorGraphNode.

Instance Methods [hide private]
 
__init__(self, root, type_)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
__call__(self, visitor)
Apply the visitor to each node in turn.
source code
 
__arguments(self, node, visitor, results)
Collect arguments for the constructor.
source code
 
__value(self, node, visitor, results)
Get a value for a particular constructor argument.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, root, type_)
(Constructor)

source code 
x.__init__(...) initializes x; see help(type(x)) for signature
Overrides: object.__init__
(inherited documentation)