Add OpType for Metal Claw operators
This commit is contained in:
parent
6815402ba1
commit
70896b8761
18
deps/ox/src/ox/mc/optype.hpp
vendored
Normal file
18
deps/ox/src/ox/mc/optype.hpp
vendored
Normal file
@ -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
|
||||
};
|
||||
|
||||
}
|
5
deps/ox/src/ox/mc/read.hpp
vendored
5
deps/ox/src/ox/mc/read.hpp
vendored
@ -11,6 +11,7 @@
|
||||
#include <ox/std/byteswap.hpp>
|
||||
#include <ox/std/string.hpp>
|
||||
#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<typename I>
|
||||
int readInteger(I *val);
|
||||
|
5
deps/ox/src/ox/mc/write.hpp
vendored
5
deps/ox/src/ox/mc/write.hpp
vendored
@ -11,6 +11,7 @@
|
||||
#include <ox/std/string.hpp>
|
||||
#include <ox/std/types.hpp>
|
||||
#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<typename I>
|
||||
int appendInteger(I val);
|
||||
|
Loading…
Reference in New Issue
Block a user