Home | Trees | Index | Help |
---|
Package docutils :: Module nodes :: Class GenericNodeVisitor |
|
NodeVisitor
--+
|
GenericNodeVisitor
RestXmlDocument
Generic "Visitor" abstract superclass, for simple traversals.
Unless overridden, each visit_... method calls default_visit()
, and
each depart_... method (when using Node.walkabout()
) calls
default_departure()
. default_visit()
(and default_departure()
) must
be overridden in subclasses.
Define fully generic visitors by overriding default_visit()
(and
default_departure()
) only. Define semi-generic visitors by overriding
individual visit_...() (and depart_...()) methods also.
NodeVisitor.unknown_visit()
(NodeVisitor.unknown_departure()
) should
be overridden for default behavior.
Method Summary | |
---|---|
Override for generic, uniform traversals. | |
Override for generic, uniform traversals. | |
Inherited from NodeVisitor | |
| |
Call self."depart_ + node class name" with node as
parameter. | |
Call self."visit_ + node class name" with node as
parameter. | |
Called before exiting unknown Node types. | |
Called when entering unknown Node types. |
Class Variable Summary | |
---|---|
Inherited from NodeVisitor | |
tuple |
optional = ()
|
Method Details |
---|
default_departure(self, node)Override for generic, uniform traversals. |
default_visit(self, node)Override for generic, uniform traversals. |
Home | Trees | Index | Help |
---|
Generated by Epydoc 2.1 on Wed Jul 12 11:20:40 2006 | http://epydoc.sf.net |