ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

serializer.h File Reference

#include "common/stream.h"
#include "common/str.h"
Include dependency graph for serializer.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Common::Serializer
 This class allows syncing / serializing data (primarily game savestates) between memory and Read/WriteStreams. More...
class  Common::Serializable

Namespaces

namespace  Common
 

Internal interface to the QuickTime audio decoder.


Defines

#define VER(x)   Common::Serializer::Version(x)
#define SYNC_AS(SUFFIX, TYPE, SIZE)
#define SYNC_PRIMITIVE(suffix)

Define Documentation

#define SYNC_AS (   SUFFIX,
  TYPE,
  SIZE 
)
Value:
template<typename T> \
    void syncAs ## SUFFIX(T &val, Version minVersion = 0, Version maxVersion = kLastVersion) { \
        if (_version < minVersion || _version > maxVersion) \
            return; \
        if (_loadStream) \
            val = static_cast<T>(_loadStream->read ## SUFFIX()); \
        else { \
            TYPE tmp = val; \
            _saveStream->write ## SUFFIX(tmp); \
        } \
        _bytesSynced += SIZE; \
    }

Definition at line 33 of file serializer.h.

#define SYNC_PRIMITIVE (   suffix  ) 
Value:
template <typename T> \
    static inline void suffix(Serializer &s, T &value) { \
        s.syncAs##suffix(value); \
    }

Definition at line 47 of file serializer.h.

#define VER (   x  )     Common::Serializer::Version(x)

Definition at line 31 of file serializer.h.



Generated on Sat Jul 13 2019 05:01:46 for ResidualVM by doxygen 1.7.1
curved edge   curved edge