Module Cerealizer :: Class SlotedObjHandler
[hide private]
[frames] | no frames]

Class SlotedObjHandler

source code

object --+        
         |        
   Handler --+    
             |    
    ObjHandler --+
                 |
                SlotedObjHandler

SlotedObjHandler

A Cerealizer Handler that can support new-style class instances with __slot__.

Instance Methods [hide private]
 
__init__(self, Class, classname='')
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
collect(self, obj, dumper)
Collects all the objects referenced by OBJ.
source code
 
undump_data(self, obj, dumper, s)
Reads the data for OBJ, from DUMPER and file S.
source code

Inherited from ObjHandler: dump_data, undump_obj

Inherited from Handler: dump_obj, dump_ref

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, Class, classname='')
(Constructor)

source code 
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
Overrides: ObjHandler.__init__

collect(self, obj, dumper)

source code 
Collects all the objects referenced by OBJ. For each objects ROBJ referenced by OBJ, calls collect method of the Handler for ROBJ's class, i.e._HANDLERS_[ROBJ.__class__].collect(ROBJ, dumper). Returns false if OBJ is already referenced (and thus no collection should occur); else returns true.
Returns:
bool

Overrides: ObjHandler.collect

undump_data(self, obj, dumper, s)

source code 
Reads the data for OBJ, from DUMPER and file S. If you override undump_data, you should use DUMPER.undump_ref(S) to read a reference or a basic type (=a string, an int,...).
Overrides: ObjHandler.undump_data