#include <saveload.h>
Public Member Functions | |
Serializer (Common::SeekableReadStream *in, Common::WriteStream *out) | |
void | setSaveVersion (byte version) |
void | syncPointer (SavedObject **ptr, Common::Serializer::Version minVersion=0, Common::Serializer::Version maxVersion=kLastVersion) |
void | validate (const Common::String &s, Common::Serializer::Version minVersion=0, Common::Serializer::Version maxVersion=kLastVersion) |
void | validate (int v, Common::Serializer::Version minVersion=0, Common::Serializer::Version maxVersion=kLastVersion) |
void | syncAsDouble (double &v) |
Public Member Functions inherited from Common::Serializer | |
Serializer (SeekableReadStream *in, WriteStream *out) | |
bool | isSaving () |
bool | isLoading () |
template<typename T > | |
void | syncAsByte (T &val, Version minVersion=0, Version maxVersion=kLastVersion) |
template<typename T > | |
void | syncAsSByte (T &val, Version minVersion=0, Version maxVersion=kLastVersion) |
template<typename T > | |
void | syncAsUint16LE (T &val, Version minVersion=0, Version maxVersion=kLastVersion) |
template<typename T > | |
void | syncAsUint16BE (T &val, Version minVersion=0, Version maxVersion=kLastVersion) |
template<typename T > | |
void | syncAsSint16LE (T &val, Version minVersion=0, Version maxVersion=kLastVersion) |
template<typename T > | |
void | syncAsSint16BE (T &val, Version minVersion=0, Version maxVersion=kLastVersion) |
template<typename T > | |
void | syncAsUint32LE (T &val, Version minVersion=0, Version maxVersion=kLastVersion) |
template<typename T > | |
void | syncAsUint32BE (T &val, Version minVersion=0, Version maxVersion=kLastVersion) |
template<typename T > | |
void | syncAsSint32LE (T &val, Version minVersion=0, Version maxVersion=kLastVersion) |
template<typename T > | |
void | syncAsSint32BE (T &val, Version minVersion=0, Version maxVersion=kLastVersion) |
template<typename T > | |
void | syncAsFloatLE (T &val, Version minVersion=0, Version maxVersion=kLastVersion) |
template<typename T > | |
void | syncAsFloatBE (T &val, Version minVersion=0, Version maxVersion=kLastVersion) |
template<typename T > | |
void | syncAsDoubleLE (T &val, Version minVersion=0, Version maxVersion=kLastVersion) |
template<typename T > | |
void | syncAsDoubleBE (T &val, Version minVersion=0, Version maxVersion=kLastVersion) |
bool | err () const |
void | clearErr () |
bool | syncVersion (Version currentVersion) |
Version | getVersion () const |
void | setVersion (Version version) |
uint | bytesSynced () const |
void | skip (uint32 size, Version minVersion=0, Version maxVersion=kLastVersion) |
void | syncBytes (byte *buf, uint32 size, Version minVersion=0, Version maxVersion=kLastVersion) |
bool | matchBytes (const char *magic, byte size, Version minVersion=0, Version maxVersion=kLastVersion) |
void | syncString (String &str, Version minVersion=0, Version maxVersion=kLastVersion) |
void | syncString32 (U32String &str, Version minVersion=0, Version maxVersion=kLastVersion) |
template<typename T > | |
void | syncArray (T *arr, size_t entries, void(*serializer)(Serializer &, T &), Version minVersion=0, Version maxVersion=kLastVersion) |
Additional Inherited Members | |
Public Types inherited from Common::Serializer | |
typedef uint32 | Version |
Static Public Member Functions inherited from Common::Serializer | |
template<typename T > | |
static void | Uint32LE (Serializer &s, T &value) |
template<typename T > | |
static void | Uint32BE (Serializer &s, T &value) |
template<typename T > | |
static void | Sint32LE (Serializer &s, T &value) |
template<typename T > | |
static void | Sint32BE (Serializer &s, T &value) |
template<typename T > | |
static void | FloatLE (Serializer &s, T &value) |
template<typename T > | |
static void | FloatBE (Serializer &s, T &value) |
template<typename T > | |
static void | DoubleLE (Serializer &s, T &value) |
template<typename T > | |
static void | DoubleBE (Serializer &s, T &value) |
template<typename T > | |
static void | Uint16LE (Serializer &s, T &value) |
template<typename T > | |
static void | Uint16BE (Serializer &s, T &value) |
template<typename T > | |
static void | Sint16LE (Serializer &s, T &value) |
template<typename T > | |
static void | Sint16BE (Serializer &s, T &value) |
template<typename T > | |
static void | Byte (Serializer &s, T &value) |
template<typename T > | |
static void | SByte (Serializer &s, T &value) |
Static Public Attributes inherited from Common::Serializer | |
static const Version | kLastVersion = 0xFFFFFFFF |
Protected Attributes inherited from Common::Serializer | |
SeekableReadStream * | _loadStream |
WriteStream * | _saveStream |
uint | _bytesSynced |
Version | _version |
Derived serializer class with extra synchronization types