PhoenixSerializer  3.0.0
PhoenixSerializer is a framework to save/load/serialize/deserialize data
Loading...
Searching...
No Matches
data_stream_enum.h File Reference
Include dependency graph for data_stream_enum.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define PHOENIX_DATA_STREAM_ENUM(X)
 Macro which allows to simply integrate enum types into Data Stream workflow.

Macro Definition Documentation

◆ PHOENIX_DATA_STREAM_ENUM

#define PHOENIX_DATA_STREAM_ENUM ( X)
Value:
template <typename Stream> \
struct Serializer<Stream, SerializeMode::READ, X> { \
static bool phoenix_serialize(Stream & ds, X & data) { \
int value(0); \
data = (X)value; \
return b; \
} \
}; \
template <typename Stream> \
struct Serializer<Stream, SerializeMode::WRITE, X> { \
static bool phoenix_serialize(Stream & ds, X & data) { \
int value = (int)data; \
} \
};
SerializeMode
Stream mode : READ or WRITE.
Generic Serializer class.
static bool phoenix_serialize(Stream &ds, T &data)
Dummy function to catch if a type is not specialised.

Macro which allows to simply integrate enum types into Data Stream workflow.

Definition at line 14 of file data_stream_enum.h.