serialization $ DuplexCache :: SELF
Type of this instance, automatically specialized in every classserialization $ DuplexCache :: new_id_for
Get a new id forobject
and store it
core :: Object :: class_factory
Implementation used byget_class
to create the specific class.
core :: Object :: defaultinit
serialization :: DeserializerCache :: has_id
Is there an object associated toid
?
serialization :: SerializerCache :: has_object
Isobject
known?
serialization :: SerializerCache :: id_for
Get the id forobject
core :: Object :: is_same_instance
Return true ifself
and other
are the same instance (i.e. same identity).
core :: Object :: is_same_serialized
Isself
the same as other
in a serialization context?
core :: Object :: is_same_type
Return true ifself
and other
have the same dynamic type.
serialization :: SerializerCache :: new_id_for
Get a new id forobject
and store it
serialization :: SerializerCache :: next_available_id
Get a free id to associate to an object in the cacheserialization :: DeserializerCache :: object_for
Get the object associated toid
core :: Object :: output_class_name
Display class name on stdout (debug only).serialization :: DeserializerCache :: received
Map of references to already deserialized objects.serialization :: DeserializerCache :: received=
Map of references to already deserialized objects.serialization :: SerializerCache :: sent
Map of already serialized objects to the reference idserialization :: SerializerCache :: sent=
Map of already serialized objects to the reference idserialization :: DeserializerCache
Cache of received objects sorted by there reference id
# A shared cache for serialization and deserialization
class DuplexCache
super SerializerCache
super DeserializerCache
redef fun new_id_for(object)
do
var id = super
received[id] = object
return id
end
redef fun []=(id, object)
do
super
assert object isa Serializable
sent[object] = id
end
end
lib/serialization/caching.nit:103,1--121,3