CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CeresEngine::ISerializable Class Referenceabstract

An interface that must be implemented by a class to support custom intrusive serialization. More...

#include <CeresEngine/Serialization/ISerializable.hpp>

Public Member Functions

virtual ~ISerializable () noexcept=default
 Defaulted virtual destructor.
 
virtual void serialize (Serializer &serializer) const =0
 Serializes the object into the given stream.
 
virtual void deserialize (Deserializer &deserializer)=0
 Deserializes the object from the given stream.
 

Detailed Description

An interface that must be implemented by a class to support custom intrusive serialization.

Objects that wish to implement their own serialization scheme, can implement this interface to support intrusive serialization.

Constructor & Destructor Documentation

◆ ~ISerializable()

virtual CeresEngine::ISerializable::~ISerializable ( )
virtualdefaultnoexcept

Defaulted virtual destructor.

Member Function Documentation

◆ deserialize()

virtual void CeresEngine::ISerializable::deserialize ( Deserializer deserializer)
pure virtual

Deserializes the object from the given stream.

If called from within the context of a Deserializer, the read data is proxied from the deserialization stream.

Parameters
deserializerThe deserializer to deserialize the object from.

◆ serialize()

virtual void CeresEngine::ISerializable::serialize ( Serializer serializer) const
pure virtual

Serializes the object into the given stream.

If called from within the context of Serializer, the written data will be embedded on the serialization stream.

Parameters
serializerThe serializer to serialize the object to.

The documentation for this class was generated from the following file: