[ox/model] Add oxModelFieldRename macro

This commit is contained in:
Gary Talent 2022-02-13 13:37:48 -06:00
parent f89d69e293
commit 18f02ae25e

View File

@ -11,4 +11,5 @@
#define oxModelBegin(modelName) template<typename T> constexpr ox::Error model(T *io, modelName *o) noexcept { io->template setTypeInfo<modelName>();
#define oxModelEnd() return OxError(0); }
#define oxModelField(fieldName) oxReturnError(io->field(#fieldName, &o->fieldName));
#define oxModelFieldRename(serFieldName, objFieldName) oxReturnError(io->field(#serFieldName, &o->objFieldName));
#define oxModelFriend(modelName) template<typename T> friend constexpr ox::Error model(T*, modelName*) noexcept