OmniSciDB  b24e664e58
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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

Enumerator
Add 
Mul 

Definition at line 275 of file ResultSetReductionOps.h.

275  {
276  Add,
277  Mul,
278  };

Constructor & Destructor Documentation

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) {}
const std::string & label() const
Instruction(const Type type, const std::string &label)
BinaryOp op() const

Member Function Documentation

const Value* BinaryOperator::lhs ( ) const
inline

Definition at line 288 of file ResultSetReductionOps.h.

References lhs_.

288 { return lhs_; }
BinaryOp BinaryOperator::op ( ) const
inline

Definition at line 286 of file ResultSetReductionOps.h.

References op_.

286 { return op_; }
const Value* BinaryOperator::rhs ( ) const
inline

Definition at line 290 of file ResultSetReductionOps.h.

References rhs_.

290 { return rhs_; }
void BinaryOperator::run ( ReductionInterpreterImpl interpreter)
overridevirtual

Implements Instruction.

Definition at line 359 of file ResultSetReductionInterpreter.cpp.

References ReductionInterpreterImpl::runBinaryOperator().

359  {
361 }
static void runBinaryOperator(const Instruction *instruction, ReductionInterpreterImpl *interpreter)

+ Here is the call graph for this function:

Member Data Documentation

const Value* BinaryOperator::lhs_
private

Definition at line 296 of file ResultSetReductionOps.h.

Referenced by lhs().

const BinaryOp BinaryOperator::op_
private

Definition at line 295 of file ResultSetReductionOps.h.

Referenced by op().

const Value* BinaryOperator::rhs_
private

Definition at line 297 of file ResultSetReductionOps.h.

Referenced by rhs().


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