Package pyxb :: Package xmlschema :: Module structures :: Class _ParticleTree_mixin
[hide private]
[frames] | no frames]

Class _ParticleTree_mixin

source code

object --+    
         |    
   cscRoot --+
             |
            _ParticleTree_mixin
Known Subclasses:

Instance Methods [hide private]
 
_walkParticleTree(self, visit, arg)
Mix-in supporting walks of Particle trees.
source code

Inherited from cscRoot: __init__

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]

_walkParticleTree(self, visit, arg)

source code 

Mix-in supporting walks of Particle trees.

This invokes a provided function on each node in a tree defining the content model of a particle, both on the way down the tree and on the way back up. A standard implementation would be:

 def _walkParticleTree (self, visit, arg):
   visit(self, True, arg)
   self.__term.walkParticleTree(visit, arg)
   visit(self, False, arg)
Parameters:
  • visit - A callable with parameters node, entering, arg where node is an instance of a class inheriting _ParticleTree_mixin, entering indicates tree transition status, and arg is a caller-provided state parameter. entering is True if node has particle children and the call is before they are visited; None if the node has no particle children; and False if node has particle children and they have been visited.
  • arg - The caller-provided state parameter to be passed along with the node and entry/exit status in the invocation of visit.