CMS 3D CMS Logo

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

Evaluate an object's method or datamember (or chain of them) to get a number. More...

#include <ExpressionVar.h>

Inheritance diagram for reco::parser::ExpressionVar:
reco::parser::ExpressionBase

Public Member Functions

 ExpressionVar (const std::vector< MethodInvoker > &methods, method::TypeCode retType)
 
 ExpressionVar (const ExpressionVar &)
 
virtual double value (const edm::ObjectWithDict &) const
 
 ~ExpressionVar ()
 
- Public Member Functions inherited from reco::parser::ExpressionBase
virtual ~ExpressionBase ()
 

Static Public Member Functions

static void delStorage (edm::ObjectWithDict &)
 
static bool isValidReturnType (method::TypeCode)
 
static bool makeStorage (edm::ObjectWithDict &obj, const edm::TypeWithDict &retType)
 
static double objToDouble (const edm::ObjectWithDict &obj, method::TypeCode type)
 

Private Member Functions

void initObjects_ ()
 

Private Attributes

std::vector< MethodInvokermethods_
 
std::vector< bool > needsDestructor_
 
std::vector< edm::ObjectWithDictobjects_
 
method::TypeCode retType_
 

Detailed Description

Evaluate an object's method or datamember (or chain of them) to get a number.

Definition at line 23 of file ExpressionVar.h.

Constructor & Destructor Documentation

ExpressionVar::ExpressionVar ( const std::vector< MethodInvoker > &  methods,
method::TypeCode  retType 
)

Definition at line 31 of file ExpressionVar.cc.

ExpressionVar::ExpressionVar ( const ExpressionVar rhs)

Definition at line 39 of file ExpressionVar.cc.

ExpressionVar::~ExpressionVar ( )

Definition at line 46 of file ExpressionVar.cc.

Member Function Documentation

void ExpressionVar::delStorage ( edm::ObjectWithDict obj)
static

delete an objecty, if needed this method is used also from the LazyInvoker code

Definition at line 56 of file ExpressionVar.cc.

void ExpressionVar::initObjects_ ( )
private

Definition at line 15 of file ExpressionVar.cc.

bool ExpressionVar::isValidReturnType ( method::TypeCode  retType)
static

Definition at line 96 of file ExpressionVar.cc.

Referenced by reco::parser::ExpressionVarSetter::push().

bool ExpressionVar::makeStorage ( edm::ObjectWithDict obj,
const edm::TypeWithDict retType 
)
static

allocate an object to hold the result of a given member (if needed) this method is used also from the LazyInvoker code returns true if objects returned from this will require a destructor

Definition at line 74 of file ExpressionVar.cc.

double ExpressionVar::objToDouble ( const edm::ObjectWithDict obj,
method::TypeCode  type 
)
static

performs the needed conversion from void* to double this method is used also from the ExpressionLazyVar code

Definition at line 162 of file ExpressionVar.cc.

double ExpressionVar::value ( const edm::ObjectWithDict obj) const
virtual

Implements reco::parser::ExpressionBase.

Definition at line 144 of file ExpressionVar.cc.

Referenced by average.Average::average().

Member Data Documentation

std::vector<MethodInvoker> reco::parser::ExpressionVar::methods_
private

Definition at line 25 of file ExpressionVar.h.

std::vector<bool> reco::parser::ExpressionVar::needsDestructor_
mutableprivate

Definition at line 27 of file ExpressionVar.h.

std::vector<edm::ObjectWithDict> reco::parser::ExpressionVar::objects_
mutableprivate

Definition at line 26 of file ExpressionVar.h.

method::TypeCode reco::parser::ExpressionVar::retType_
private

Definition at line 28 of file ExpressionVar.h.