pyffi :: spells :: nif :: check :: SpellReadWrite :: Class SpellReadWrite
[hide private]
[frames] | no frames]

Class SpellReadWrite

source code

object --+        
         |        
     Spell --+    
             |    
      NifSpell --+
                 |
                SpellReadWrite

Like the original read-write spell, but with additional file size check.
Instance Methods [hide private]
bool
datainspect(self)
Only process nifs if they have all admissible block types.
source code
bool
dataentry(self)
Called before all blocks are recursed.
source code

Inherited from NifSpell: inspectblocktype

Inherited from NifSpell (private): _datainspect

Inherited from Spell: __init__, branchentry, branchexit, branchinspect, dataexit, recurse

Inherited from Spell (private): _branchinspect

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

Class Methods [hide private]

Inherited from Spell: get_toast_stream, toastentry, toastexit

Class Variables [hide private]
  SPELLNAME = 'check_readwrite'
A str describing how to refer to the spell from the command line.

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

datainspect(self)

source code 
Only process nifs if they have all admissible block types. Note that the default rule is to process a nif if it has at least one admissible block type, but for read write spells it makes more sense to impose all.
Returns: bool
True if the file must be processed, False otherwise.
Overrides: Spell.datainspect

dataentry(self)

source code 

Called before all blocks are recursed. The default implementation simply returns True. You can access the data via data, and unlike in the datainspect method, the full file has been processed at this stage.

Typically, you will override this function to perform a global operation on the file data.

Returns: bool
True if the children must be processed, False otherwise.
Overrides: Spell.dataentry
(inherited documentation)