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

Class DictHandler

source code

object --+    
         |    
   Handler --+
             |
            DictHandler

Instance Methods [hide private]
 
collect(self, obj, dumper)
Collects all the objects referenced by OBJ.
source code
 
dump_data(self, obj, dumper, s)
Dumps OBJ data in file S.
source code
 
undump_obj(self, dumper, s)
Returns a new uninitialized (=no __init__'ed) instance of the class.
source code
 
undump_data(self, obj, dumper, s)
Reads the data for OBJ, from DUMPER and file S.
source code

Inherited from Handler: dump_obj, dump_ref

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

Class Variables [hide private]
  classname = 'dict\n'
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

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: Handler.collect
(inherited documentation)

dump_data(self, obj, dumper, s)

source code 
Dumps OBJ data in file S.
Overrides: Handler.dump_data
(inherited documentation)

undump_obj(self, dumper, s)

source code 
Returns a new uninitialized (=no __init__'ed) instance of the class. If you override undump_obj, DUMPER and file S can be used to read additional data saved by Handler.dump_obj().
Overrides: Handler.undump_obj
(inherited documentation)

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: Handler.undump_data
(inherited documentation)