Wire Sysio Wire Sysion 1.0.0
|
#include <archiver.h>
Archiver can be a reader or writer for serialization or deserialization respectively.
class Archiver { public: /
/ Starts an object Archiver& StartObject();
/ After calling StartObject(), assign a member with a name Archiver& Member(const char* name);
/ After calling StartObject(), check if a member presents bool HasMember(const char* name) const;
/ Ends an object Archiver& EndObject();
/ Starts an array /
size | If Archiver::IsReader is true, the size of array is written. Archiver& StartArray(size_t* size = 0); |
/ Ends an array Archiver& EndArray();
/ Read/Write primitive types. Archiver& operator&(bool& b); Archiver& operator&(unsigned& u); Archiver& operator&(int& i); Archiver& operator&(double& d); Archiver& operator&(std::string& s);
/ Write primitive types. Archiver& SetNull();
! Whether it is a reader. static const bool IsReader;
! Whether it is a writer. static const bool IsWriter; };