gensrc.serialization.serializer.Serializer Class Reference
Inheritance diagram for gensrc.serialization.serializer.Serializer:
Collaboration diagram for gensrc.serialization.serializer.Serializer:

Public Member Functions

def __init__ (self)
 

Detailed Description

An object which can write a Serializable object to, or read it from,
a data stream.

Base class Serializer represents the interface for both Serializers 
(Writers) and Deserializers (Readers).  All subclasses of Serializer 
implement the same interface.  When a Serializable object invokes the 
interface of a Serializer, the Serializable doesn't need to know if it's 
being read or written e.g:

    class Foo(serializable.Serializable):
        def serialize(self, serializer):
            serializer.serializeAttribute(self, common.NAME)

Base class Serializer is presently empty and is included to clarify
class relationships. 

The documentation for this class was generated from the following file:
  • serializer.py