Package peppy :: Package lib :: Module structrecord :: Class Record
[frames] | no frames]

Class Record

      object --+        
               |        
debug.debugmixin --+    
                   |    
               Field --+
                       |
                      Record

baseclass for binary records

Instance Methods
 
__init__(self, name=None, default=None, typedef=None, debuglevel=0)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
 
storeDefault(self, obj)
 
getNumBytes(self, obj, subtypedefs=None)
 
unpack(self, fh, obj)
 
pack(self, fh, obj)
 
unserialize(self, fh, partial=False)
 
unserializePostHook(self)
 
serializePreHook(self)
 
serialize(self, fh, partial=False)
 
size(self)
 
sizeSubset(self, start, end)
 
getTree(self)
Get a list of nodes for use in a tree display.

Inherited from Field: __str__, getCopy, read

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__

Class Methods

Inherited from debug.debugmixin: dprint

Class Variables
  debuglevel = 0
  typedef = ()

Inherited from Field: print_all

Properties

Inherited from object: __class__

Method Details

__init__(self, name=None, default=None, typedef=None, debuglevel=0)
(Constructor)

 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

storeDefault(self, obj)

 
Overrides: Field.storeDefault

getNumBytes(self, obj, subtypedefs=None)

 
Overrides: Field.getNumBytes

unpack(self, fh, obj)

 
Overrides: Field.unpack

pack(self, fh, obj)

 
Overrides: Field.pack

getTree(self)

 

Get a list of nodes for use in a tree display.

The returned list of nodes is a list of tuples for each field in the Record. Each entry in the tuple will have either two or three entries. If the field is a list, the tuple with have two entries: the name and the list of records contained within the field. If the field represents another Record, the tuple will contain the name and the Record. Otherwise, the tuple contains the name, the python value, and the packed value.