OmniSciDB  b28c0d5765
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups 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 344 of file ResultSetReductionOps.h.

Member Enumeration Documentation

Enumerator
Add 
Mul 

Definition at line 346 of file ResultSetReductionOps.h.

346  {
347  Add,
348  Mul,
349  };

Constructor & Destructor Documentation

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

Definition at line 351 of file ResultSetReductionOps.h.

355  : 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 359 of file ResultSetReductionOps.h.

References lhs_.

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

Definition at line 357 of file ResultSetReductionOps.h.

References op_.

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

Definition at line 361 of file ResultSetReductionOps.h.

References rhs_.

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

Implements Instruction.

Definition at line 375 of file ResultSetReductionInterpreter.cpp.

References ReductionInterpreterImpl::runBinaryOperator().

375  {
377 }
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 367 of file ResultSetReductionOps.h.

Referenced by lhs().

const BinaryOp BinaryOperator::op_
private

Definition at line 366 of file ResultSetReductionOps.h.

Referenced by op().

const Value* BinaryOperator::rhs_
private

Definition at line 368 of file ResultSetReductionOps.h.

Referenced by rhs().


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