Package pyffi :: Module spells :: Class SpellGroupParallelBase
[hide private]
[frames] | no frames]

Class SpellGroupParallelBase

source code

object --+        
         |        
     Spell --+    
             |    
SpellGroupBase --+
                 |
                SpellGroupParallelBase
Known Subclasses:

Base class for running spells in parallel (that is, with only a single recursion in the tree).
Instance Methods [hide private]
bool
branchinspect(self, branch)
Inspect spells with Spell.branchinspect (not all checks are executed, only keeps going until a spell inspection returns True).
source code
bool
branchentry(self, branch)
Run all spells.
source code
 
branchexit(self, branch)
Cast a spell on the given branch, after all its children, grandchildren, have been processed, if branchentry returned True on the given branch.
source code
bool
dataentry(self)
Look into every spell with Spell.dataentry.
source code
 
dataexit(self)
Look into every spell with Spell.dataexit.
source code

Inherited from SpellGroupBase: __init__, datainspect

Inherited from Spell: recurse

Inherited from Spell (private): _branchinspect, _datainspect

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

Class Methods [hide private]

Inherited from SpellGroupBase: toastentry, toastexit

Inherited from Spell: get_toast_stream

Class Variables [hide private]

Inherited from SpellGroupBase: ACTIVESPELLCLASSES, SPELLCLASSES, spells

Inherited from Spell: READONLY, SPELLNAME, data, stream, toaster

Properties [hide private]
  changed
Whether the spell changed the data.

Inherited from object: __class__

Method Details [hide private]

branchinspect(self, branch)

source code 
Inspect spells with Spell.branchinspect (not all checks are executed, only keeps going until a spell inspection returns True).
Parameters:
  • branch - The branch to check.
Returns: bool
True if the branch must be processed, False otherwise.
Overrides: Spell.branchinspect

branchentry(self, branch)

source code 
Run all spells.
Parameters:
  • branch - The branch to cast the spell on.
Returns: bool
True if the children must be processed, False otherwise.
Overrides: Spell.branchentry

branchexit(self, branch)

source code 

Cast a spell on the given branch, after all its children, grandchildren, have been processed, if branchentry returned True on the given branch.

Typically, you will override this function to perform a particular operation on a block type, but you rely on the fact that the children must have been processed first.

Parameters:
  • branch - The branch to cast the spell on.
Overrides: Spell.branchexit
(inherited documentation)

dataentry(self)

source code 
Look into every spell with Spell.dataentry.
Returns: bool
True if the children must be processed, False otherwise.
Overrides: Spell.dataentry

dataexit(self)

source code 
Look into every spell with Spell.dataexit.
Overrides: Spell.dataexit

Property Details [hide private]

changed

Whether the spell changed the data. If True, the file will be written back, otherwise not.
Get Method:
unreachable.changed(self)