CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
reco::formula::BinaryOperatorEvaluatorBase Class Reference

#include <formulaBinaryOperatorEvaluator.h>

Inheritance diagram for reco::formula::BinaryOperatorEvaluatorBase:
reco::formula::EvaluatorBase reco::formula::BinaryOperatorEvaluator< Op >

Public Member Functions

 BinaryOperatorEvaluatorBase (std::shared_ptr< EvaluatorBase > iLHS, std::shared_ptr< EvaluatorBase > iRHS, Precedence iPrec)
 
 BinaryOperatorEvaluatorBase (Precedence iPrec)
 
EvaluatorBase const * lhs () const
 
EvaluatorBase const * rhs () const
 
void setLeftEvaluator (std::shared_ptr< EvaluatorBase > iOther)
 
void setRightEvaluator (std::shared_ptr< EvaluatorBase > iOther)
 
void swapLeftEvaluator (std::shared_ptr< EvaluatorBase > &iNew)
 
- Public Member Functions inherited from reco::formula::EvaluatorBase
virtual double evaluate (double const *iVariables, double const *iParameters) const =0
 
 EvaluatorBase ()
 
 EvaluatorBase (Precedence)
 
unsigned int precedence () const
 
void setPrecedenceToParenthesis ()
 
virtual ~EvaluatorBase ()
 

Private Attributes

std::shared_ptr< EvaluatorBasem_lhs
 
std::shared_ptr< EvaluatorBasem_rhs
 

Additional Inherited Members

- Public Types inherited from reco::formula::EvaluatorBase
enum  Precedence {
  Precedence::kIdentity = 1, Precedence::kComparison =2, Precedence::kPlusMinus = 3, Precedence::kMultDiv = 4,
  Precedence::kPower = 5, Precedence::kFunction = 6, Precedence::kParenthesis = 7, Precedence::kUnaryMinusOperator = 8
}
 

Detailed Description

Definition at line 31 of file formulaBinaryOperatorEvaluator.h.

Constructor & Destructor Documentation

reco::formula::BinaryOperatorEvaluatorBase::BinaryOperatorEvaluatorBase ( std::shared_ptr< EvaluatorBase iLHS,
std::shared_ptr< EvaluatorBase iRHS,
Precedence  iPrec 
)
inline

Definition at line 33 of file formulaBinaryOperatorEvaluator.h.

35  :
36  EvaluatorBase(iPrec),
37  m_lhs(iLHS),
38  m_rhs(iRHS) {}
reco::formula::BinaryOperatorEvaluatorBase::BinaryOperatorEvaluatorBase ( Precedence  iPrec)
inline

Definition at line 40 of file formulaBinaryOperatorEvaluator.h.

Member Function Documentation

EvaluatorBase const* reco::formula::BinaryOperatorEvaluatorBase::lhs ( ) const
inline

Definition at line 54 of file formulaBinaryOperatorEvaluator.h.

References m_lhs.

Referenced by reco::formula::BinaryOperatorEvaluator< Op >::evaluate().

54 { return m_lhs.get(); }
EvaluatorBase const* reco::formula::BinaryOperatorEvaluatorBase::rhs ( ) const
inline

Definition at line 55 of file formulaBinaryOperatorEvaluator.h.

References m_rhs.

Referenced by reco::formula::BinaryOperatorEvaluator< Op >::evaluate().

55 { return m_rhs.get(); }
void reco::formula::BinaryOperatorEvaluatorBase::setLeftEvaluator ( std::shared_ptr< EvaluatorBase iOther)
inline

Definition at line 47 of file formulaBinaryOperatorEvaluator.h.

References m_lhs, and eostools::move().

47  {
48  m_lhs = std::move(iOther);
49  }
def move
Definition: eostools.py:510
void reco::formula::BinaryOperatorEvaluatorBase::setRightEvaluator ( std::shared_ptr< EvaluatorBase iOther)
inline

Definition at line 50 of file formulaBinaryOperatorEvaluator.h.

References m_rhs, and eostools::move().

50  {
51  m_rhs = std::move(iOther);
52  }
def move
Definition: eostools.py:510
void reco::formula::BinaryOperatorEvaluatorBase::swapLeftEvaluator ( std::shared_ptr< EvaluatorBase > &  iNew)
inline

Definition at line 43 of file formulaBinaryOperatorEvaluator.h.

References m_lhs.

43  {
44  m_lhs.swap(iNew);
45  }

Member Data Documentation

std::shared_ptr<EvaluatorBase> reco::formula::BinaryOperatorEvaluatorBase::m_lhs
private

Definition at line 58 of file formulaBinaryOperatorEvaluator.h.

Referenced by lhs(), setLeftEvaluator(), and swapLeftEvaluator().

std::shared_ptr<EvaluatorBase> reco::formula::BinaryOperatorEvaluatorBase::m_rhs
private

Definition at line 59 of file formulaBinaryOperatorEvaluator.h.

Referenced by rhs(), and setRightEvaluator().