1 #ifndef MHO_BinaryOperator_HH__
2 #define MHO_BinaryOperator_HH__
20 template<
class XArgType1,
class XArgType2 = XArgType1,
class XArgType3 = XArgType2 >
27 void SetArgs(
const XArgType1* in1,
const XArgType2* in2, XArgType3* out)
29 this->
fArgs = std::make_tuple(in1, in2, out);
35 [
this](
const XArgType1* in1,
const XArgType2* in2, XArgType3* out) {
return InitializeImpl(in1, in2, out); });
41 [
this](
const XArgType1* in1,
const XArgType2* in2, XArgType3* out) {
return ExecuteImpl(in1, in2, out); });
45 virtual bool InitializeImpl(
const XArgType1* ,
const XArgType2* , XArgType3* ) {
return true; }
47 virtual bool ExecuteImpl(
const XArgType1* in1,
const XArgType2* in2, XArgType3* out) = 0;
Variadic base that stores an operator's typed arguments (pointers expected) in a tuple and exposes a ...
Definition: MHO_ArgumentCarrier.hh:22
std::tuple< Args... > fArgs
Definition: MHO_ArgumentCarrier.hh:24
auto Apply(Func &&func) -> decltype(mho_tuple_apply(std::forward< Func >(func), fArgs))
Definition: MHO_ArgumentCarrier.hh:26
An operator that takes two array types as input (XArgType1 and XArgType2) and writes to a single outp...
Definition: MHO_BinaryOperator.hh:22
virtual bool ExecuteImpl(const XArgType1 *in1, const XArgType2 *in2, XArgType3 *out)=0
virtual bool InitializeImpl(const XArgType1 *, const XArgType2 *, XArgType3 *)
Definition: MHO_BinaryOperator.hh:45
virtual bool Initialize() override
Function Initialize.
Definition: MHO_BinaryOperator.hh:32
void SetArgs(const XArgType1 *in1, const XArgType2 *in2, XArgType3 *out)
Definition: MHO_BinaryOperator.hh:27
MHO_BinaryOperator()
Definition: MHO_BinaryOperator.hh:24
virtual ~MHO_BinaryOperator()
Definition: MHO_BinaryOperator.hh:25
virtual bool Execute() override
Function Execute.
Definition: MHO_BinaryOperator.hh:38
Definition: MHO_AdhocFlagging.hh:18