Cerealizer.SlotedObjHandler

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

## Type SlotedObjHandler

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

SlotedObjHandler

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

Method Summary
| `__init__(self, Class, classname)`
| ``collect`(self, obj, dumper)` Handler.collect(obj, dumper) -> bool
| ``undump_data`(self, obj, dumper, s)` Handler.undump_data(obj, dumper, s)
Inherited from ObjHandler
| ``dump_data`(self, obj, dumper, s)` Handler.dump_data(obj, dumper, s)
| ``undump_obj`(self, dumper, s)` Handler.undump_obj(dumper, s)
Inherited from Handler
| ``dump_obj`(self, obj, dumper, s)` Handler.dump_obj(obj, dumper, s)
| ``dump_ref`(self, obj, dumper, s)` Handler.dump_ref(obj, dumper, s)
Inherited from object
| ``__delattr__`(...)` x.__delattr__('name') <==> del x.name
| ``__getattribute__`(...)` x.__getattribute__('name') <==> x.name
| ``__hash__`(x)` x.__hash__() <==> hash(x)
| ``__new__`(T, S, ...)` T.__new__(S, ...) -> a new object with type S, a subtype of T
| ``__reduce__`(...)` helper for pickle
| ``__reduce_ex__`(...)` helper for pickle
| ``__repr__`(x)` x.__repr__() <==> repr(x)
| ``__setattr__`(...)` x.__setattr__('name', value) <==> x.name = value
| ``__str__`(x)` x.__str__() <==> str(x)

Method Details

### collect(self, obj, dumper) Handler.collect(obj, dumper) -> bool 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. Overrides: `Cerealizer.ObjHandler.collect` (inherited documentation)

### undump_data(self, obj, dumper, s) Handler.undump_data(obj, dumper, s) 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: `Cerealizer.ObjHandler.undump_data` (inherited documentation)

Generated by Epydoc 2.1 on Thu Nov 23 23:40:43 2006 | http://epydoc.sf.net