Package gavo :: Package grammars :: Module directgrammar :: Class BinCodeGenerator
[frames] | no frames]

Class BinCodeGenerator

source code

    object --+    
             |    
_CodeGenerator --+
                 |
                BinCodeGenerator

a code generator for reading fixed-length binary records.

Instance Methods
 
getItemParser(self, item, index)
returns code that parses item (a Column instance) at column index index.
source code
 
getPreamble(self)
returns a list of lines that make up the top of the booster.
source code
 
getFooter(self)
returns the code for the createDumpfile method.
source code

Inherited from _CodeGenerator: __init__, getPrototype, getSetupCode

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

Properties

Inherited from object: __class__

Method Details

getItemParser(self, item, index)

source code 

returns code that parses item (a Column instance) at column index index.

You're free to igore index.

Overrides: _CodeGenerator.getItemParser
(inherited documentation)

getPreamble(self)

source code 

returns a list of lines that make up the top of the booster.

Overrides: _CodeGenerator.getPreamble
(inherited documentation)

getFooter(self)

source code 

returns the code for the createDumpfile method.

You want to use the C fragments above for that.

The default returns something that bombs out.

Overrides: _CodeGenerator.getFooter
(inherited documentation)