neuray API Programmer's Manual

mi::neuraylib::ISerializable Class Reference

[Mi_neuray_dice]

Description

All serializable objects have to be derived from this interface. This allows to serialize them to a network stream, to disk etc. Some objects derived from this implement default functions for some of the member functions. This is the case if the class might be used locally only and never be stored to disk.

Public Member Functions

virtual void deserialize( IDeserializer* deserializer) =0
Deserializes the object from the given deserializer. More...
virtual base::​Uuid get_class_id() const =0
Returns the class ID of the object. More...
virtual void serialize( ISerializer* serializer) const =0
Serializes the object to the given serializer. More...

Member Functions

virtual void mi::​neuraylib::​ISerializable::deserialize( IDeserializer* deserializer) [pure virtual]

Deserializes the object from the given deserializer. The deserialization has to include all sub elements pointed to but serialized together with this object.

virtual base::​Uuid mi::​neuraylib::​ISerializable::get_class_id() const [pure virtual]

Returns the class ID of the object. The class ID must be unique per registered class. It is used by the serializer to identify the class during serialization. The deserializer uses the class ID reconstruct a corresponding class instance during deserialization.

Returns

The class ID.

virtual void mi::​neuraylib::​ISerializable::serialize( ISerializer* serializer) const [pure virtual]

Serializes the object to the given serializer. The serialization has to include all sub elements pointed to but serialized together with this object.