[ox/mc] Add def writer

This commit is contained in:
2019-02-11 05:59:33 +00:00
parent 96c56e2589
commit 75aeedb7b5
20 changed files with 468 additions and 17 deletions

View File

@ -43,7 +43,7 @@ struct TestStruct {
template<typename T>
int ioOp(T *io, TestStructNest *obj) {
int32_t err = 0;
io->setFields(3);
io->setTypeInfo("common::TestStructNest", 3);
err |= io->op("Bool", &obj->Bool);
err |= io->op("Int", &obj->Int);
err |= io->op("String", &obj->String);
@ -53,7 +53,7 @@ int ioOp(T *io, TestStructNest *obj) {
template<typename T>
int ioOp(T *io, TestStruct *obj) {
int err = 0;
io->setFields(14);
io->setTypeInfo("common::TestStruct", 14);
err |= io->op("Bool", &obj->Bool);
err |= io->op("Int", &obj->Int);
err |= io->op("Int1", &obj->Int1);