OmniSciDB  29e35f4d58
BinaryOperator Class Reference

#include <ResultSetReductionOps.h>

+ Inheritance diagram for BinaryOperator:
+ Collaboration diagram for BinaryOperator:

Public Types

enum  BinaryOp { BinaryOp::Add, BinaryOp::Mul }
 

Public Member Functions

 BinaryOperator (const BinaryOp op, const Value *lhs, const Value *rhs, const std::string &label)
 
BinaryOp op () const
 
const Valuelhs () const
 
const Valuerhs () const
 
void run (ReductionInterpreterImpl *interpreter) override
 
- Public Member Functions inherited from Instruction
 Instruction (const Type type, const std::string &label)
 
- Public Member Functions inherited from Value
 Value (const Type type, const std::string &label)
 
Type type () const
 
size_t id () const
 
const std::string & label () const
 
virtual ~Value ()=default
 

Private Attributes

const BinaryOp op_
 
const Valuelhs_
 
const Valuerhs_
 

Detailed Description

Definition at line 273 of file ResultSetReductionOps.h.

Member Enumeration Documentation

◆ BinaryOp

Enumerator
Add 
Mul 

Definition at line 275 of file ResultSetReductionOps.h.

275  {
276  Add,
277  Mul,
278  };

Constructor & Destructor Documentation

◆ BinaryOperator()

BinaryOperator::BinaryOperator ( const BinaryOp  op,
const Value lhs,
const Value rhs,
const std::string &  label 
)
inline

Definition at line 280 of file ResultSetReductionOps.h.

284  : Instruction(Type::Int1, label), op_(op), lhs_(lhs), rhs_(rhs) {}
Instruction(const Type type, const std::string &label)
const std::string & label() const
BinaryOp op() const

Member Function Documentation

◆ lhs()

const Value* BinaryOperator::lhs ( ) const
inline

Definition at line 288 of file ResultSetReductionOps.h.

288 { return lhs_; }

◆ op()

BinaryOp BinaryOperator::op ( ) const
inline

Definition at line 286 of file ResultSetReductionOps.h.

286 { return op_; }

◆ rhs()

const Value* BinaryOperator::rhs ( ) const
inline

Definition at line 290 of file ResultSetReductionOps.h.

References run.

290 { return rhs_; }

◆ run()

void BinaryOperator::run ( ReductionInterpreterImpl interpreter)
overridevirtual

Implements Instruction.

Definition at line 370 of file ResultSetReductionInterpreter.cpp.

References ReductionInterpreterImpl::runBinaryOperator().

370  {
372 }
static void runBinaryOperator(const Instruction *instruction, ReductionInterpreterImpl *interpreter)
+ Here is the call graph for this function:

Member Data Documentation

◆ lhs_

const Value* BinaryOperator::lhs_
private

Definition at line 296 of file ResultSetReductionOps.h.

◆ op_

const BinaryOp BinaryOperator::op_
private

Definition at line 295 of file ResultSetReductionOps.h.

◆ rhs_

const Value* BinaryOperator::rhs_
private

Definition at line 297 of file ResultSetReductionOps.h.


The documentation for this class was generated from the following files: