Add general ioOp that will call ioOpRead or ioOpWrite

This commit is contained in:
Gary Talent 2017-10-15 01:40:20 -05:00
parent 70896b8761
commit 2ed10afef7

View File

@ -15,4 +15,13 @@ enum class OpType {
Write = 1
};
template<typename T, typename O>
ox::Error ioOp(T *io, O *obj) {
if (io->opType() == ox::OpType::Read) {
return ioOpRead(io, obj);
} else {
return ioOpWrite(io, obj);
}
}
}