hello world tutorial complete

This commit is contained in:
Mindaugas Vinkelis
2017-08-14 22:43:51 +03:00
parent 6e8898317e
commit a1104a9b95
7 changed files with 182 additions and 8 deletions

View File

@@ -27,15 +27,11 @@ struct MyStruct {
uint32_t i;
MyEnum e;
std::vector<float> fs;
char16_t x;
bool y;
};
//define how object should be serialized/deserialized
SERIALIZE(MyStruct) {
return s.
value1(o.y).
value2(o.x).
value4(o.i).
value2(o.e).
container4(o.fs, 10);
@@ -71,4 +67,4 @@ int main() {
//deserialize same object, can also be invoked like this: serialize(des, data)
des.object(res);
assert(data.fs == res.fs && data.i == res.i && data.e == res.e);
}
}