Pyrogenesis HEAD
Pyrogenesis, a RTS Engine
|
Helper templates definitions for serializing/deserializing common objects. More...
#include "simulation2/serialization/ISerializer.h"
#include "simulation2/serialization/IDeserializer.h"
Go to the source code of this file.
Classes | |
struct | SerializeHelper< T, SFINAE > |
Namespaces | |
namespace | Serialize |
Typedefs | |
template<typename S , class T > | |
using | Serialize::qualify = std::conditional_t< std::is_same_v< S, ISerializer & >, const T &, T & > |
Functions | |
template<typename T , typename S , typename... Args> | |
void | Serializer (S &serialize, const char *name, Args &&... args) |
template<typename T , typename S , typename... Args> | |
void | Serializer (S &serialize, const char *name, T &&value, Args &&... args) |
Helper templates definitions for serializing/deserializing common objects.
Usage: You need to (partially) specialize SerializeHelper for your type. The optional SFINAE argument can be used to provide generic specializations via std::enable_if_t<T>. If both paths are common, you can templatize operator()'s first argument, but you will need to templatize the passed value to account for different value categories.
See SerializedTypes.h for some examples.
void Serializer | ( | S & | serialize, |
const char * | name, | ||
Args &&... | args | ||
) |