diff --git a/deps/ox/src/ox/mc/optype.hpp b/deps/ox/src/ox/mc/optype.hpp new file mode 100644 index 00000000..1cd88743 --- /dev/null +++ b/deps/ox/src/ox/mc/optype.hpp @@ -0,0 +1,18 @@ +/* + * Copyright 2015 - 2017 gtalent2@gmail.com + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#pragma once + +namespace ox { + +enum class OpType { + Read = 0, + Write = 1 +}; + +} diff --git a/deps/ox/src/ox/mc/read.hpp b/deps/ox/src/ox/mc/read.hpp index 11b39287..ca521d32 100644 --- a/deps/ox/src/ox/mc/read.hpp +++ b/deps/ox/src/ox/mc/read.hpp @@ -11,6 +11,7 @@ #include #include #include "err.hpp" +#include "optype.hpp" #include "presencemask.hpp" namespace ox { @@ -49,6 +50,10 @@ class MetalClawReader { void setFields(int fields); + OpType opType() { + return OpType::Read; + } + private: template int readInteger(I *val); diff --git a/deps/ox/src/ox/mc/write.hpp b/deps/ox/src/ox/mc/write.hpp index 8380b3c7..8aebf220 100644 --- a/deps/ox/src/ox/mc/write.hpp +++ b/deps/ox/src/ox/mc/write.hpp @@ -11,6 +11,7 @@ #include #include #include "err.hpp" +#include "optype.hpp" #include "presencemask.hpp" namespace ox { @@ -49,6 +50,10 @@ class MetalClawWriter { void setFields(int fields); + OpType opType() { + return OpType::Write; + } + private: template int appendInteger(I val);