MIRA
Static Public Member Functions | Protected Types | Protected Member Functions | List of all members
DeserializerFormatMixin< BinaryStream, 2 > Class Template Reference

#include <serialization/BinarySerializer.h>

Static Public Member Functions

static uint8 getSerializerFormatVersion ()
 
static uint8 getDataFormatVersion (BinaryStream &stream)
 advances the stream to after the format information (if present)! More...
 

Protected Types

typedef ConcreteBinaryDeserializer< BinaryStream, 2 > Deserializer
 
typedef boost::mpl::bool_< true > requireReflectBarriers
 
typedef std::tuple< serialization::VersionType, bool, const char *, bool > ReflectState
 
typedef serialization::VersionType VersionType
 

Protected Member Functions

 DeserializerFormatMixin ()
 
template<typename T >
bool checkFormatVersion (T &value, bool enableTypeCheck, BinaryStream &stream)
 Checks for format version info in the stream. More...
 
ReflectState readVersion (const char *context, Deserializer &deserializer)
 Read version from binary input, memorize it for later when (if) the reflected object will ask us for it. More...
 
template<typename T >
VersionType getVersion (Deserializer &deserializer)
 Get version value read at start of object. More...
 
void restoreVersion (const ReflectState &prev)
 Restore a previous version value. More...
 
void reportVersionChecked (std::ostream &os)
 

Member Typedef Documentation

◆ Deserializer

typedef ConcreteBinaryDeserializer<BinaryStream, 2> Deserializer
protected

◆ requireReflectBarriers

typedef boost::mpl::bool_<true> requireReflectBarriers
protected

◆ ReflectState

typedef std::tuple<serialization::VersionType, bool, const char*, bool> ReflectState
protected

◆ VersionType

Constructor & Destructor Documentation

◆ DeserializerFormatMixin()

DeserializerFormatMixin ( )
inlineprotected

Member Function Documentation

◆ getSerializerFormatVersion()

static uint8 getSerializerFormatVersion ( )
inlinestatic

◆ getDataFormatVersion()

static uint8 getDataFormatVersion ( BinaryStream &  stream)
inlinestatic

advances the stream to after the format information (if present)!

◆ checkFormatVersion()

bool checkFormatVersion ( T &  value,
bool  enableTypeCheck,
BinaryStream &  stream 
)
inlineprotected

Checks for format version info in the stream.

Returns
true to continue at caller, false if already done here

◆ readVersion()

ReflectState readVersion ( const char *  context,
Deserializer deserializer 
)
inlineprotected

Read version from binary input, memorize it for later when (if) the reflected object will ask us for it.

Should be called at the start of an object, before calling its reflect() method. Returns the previously memorized version, so it can be restored after reflecting the object.

◆ getVersion()

VersionType getVersion ( Deserializer deserializer)
inlineprotected

Get version value read at start of object.

◆ restoreVersion()

void restoreVersion ( const ReflectState prev)
inlineprotected

Restore a previous version value.

Should be called when done with reflecting an object (possibly returning to its parent).

◆ reportVersionChecked()

void reportVersionChecked ( std::ostream &  os)
inlineprotected

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