CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CeresEngine::SerializerState Class Referencefinal

A class that represents context for a serializer. More...

#include <CeresEngine/Serialization/Serializer.hpp>

Inheritance diagram for CeresEngine::SerializerState:
CeresEngine::SerializationState

Public Attributes

SerializedObjectID nextObjectID = 0
 Determines the next object ID to be allocated.
 
HashMap< Pair< TypeID, const void * >, SerializedObjectIDserializedObjects
 Maps all known serialized objects to a known ID, so they can be re-used later.
 

Additional Inherited Members

- Public Member Functions inherited from CeresEngine::SerializationState
virtual ~SerializationState () noexcept=default
 
virtual bool isSerializerState () const noexcept
 Checks if the state represents a serializer state.
 
virtual bool isDeserializerState () const noexcept
 Checks if the state represents a deserializer state.
 
template<typename T , typename... Args>
TpushObjectValue (Args &&... args)
 Pushes a new object value to the state.
 
template<typename T >
TpushObject (T &object)
 Pushes a new object value to the state.
 
template<typename T >
TgetObject ()
 Gets an object from tge state.
 
template<typename T >
const TgetObject () const
 Gets an object from tge state.
 
template<typename T >
TgetObjectIf ()
 Gets an object from tge state.
 
template<typename T >
const TgetObjectIf () const
 Gets an object from tge state.
 
template<typename T >
void popObject ()
 Pops an object value from the state.
 

Detailed Description

A class that represents context for a serializer.

Member Data Documentation

◆ nextObjectID

SerializedObjectID CeresEngine::SerializerState::nextObjectID = 0

Determines the next object ID to be allocated.

◆ serializedObjects

HashMap<Pair<TypeID, const void*>, SerializedObjectID> CeresEngine::SerializerState::serializedObjects

Maps all known serialized objects to a known ID, so they can be re-used later.


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