Add general ioOp that will call ioOpRead or ioOpWrite

This commit is contained in:
2017-10-15 01:40:20 -05:00
parent 009cf99225
commit 8deae14b7b
+9
View File
@@ -15,4 +15,13 @@ enum class OpType {
Write = 1 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);
}
}
} }