Serializable
objectsmsgpack $ AttributeCounter :: SELF
Type of this instance, automatically specialized in every classmsgpack $ AttributeCounter :: serialize_attribute
Serialize an attribute to compose a serializable objectcore :: Object :: class_factory
Implementation used byget_class
to create the specific class.
serialization :: Serializer :: current_object
The object currently serialized byserialized
core :: Object :: defaultinit
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.
core :: Object :: output_class_name
Display class name on stdout (debug only).serialization :: Serializer :: serialize
Entry point method of this service, serialize theobject
serialization :: Serializer :: serialize_attribute
Serialize an attribute to compose a serializable objectserialization :: Serializer :: serialize_core
The method is called when a standardvalue
is serialized
serialization :: Serializer :: serialize_reference
Serialize an object, with full serialization or a simple referenceserialization :: Serializer :: try_to_serialize
Serializevalue
is possible, i.e. it is Serializable
or null
serialization :: Serializer :: warn
Warn of problems and potential errors (such as if an attribute
# Serialization visitor to count attribute in `Serializable` objects
class AttributeCounter
super Serializer
# Number of attributes counted
var count = 0
redef fun serialize_attribute(name, object) do count += 1
end
lib/msgpack/serialization_write.nit:151,1--159,3