Add ioOp functions for Point and Bounds

This commit is contained in:
2017-10-12 16:09:36 -05:00
parent 507c894c15
commit 9c2e71045f
13 changed files with 136 additions and 65 deletions
+15 -4
View File
@@ -14,10 +14,10 @@ namespace common {
class Bounds {
public:
int X = 0;
int Y = 0;
int Width = 0;
int Height = 0;
int x = 0;
int y = 0;
int width = 0;
int height = 0;
/**
* Constructor
@@ -37,5 +37,16 @@ class Bounds {
Point pt2();
};
template<typename T>
ox::Error ioOp(T *io, Bounds *obj) {
ox::Error err = 0;
io->setFields(4);
err |= io->op("x", &obj->x);
err |= io->op("y", &obj->y);
err |= io->op("width", &obj->width);
err |= io->op("height", &obj->height);
return err;
}
}
}