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::parser::ExpressionLazyVar Struct Reference

#include <ExpressionVar.h>

Inheritance diagram for reco::parser::ExpressionLazyVar:
reco::parser::ExpressionBase

Public Member Functions

 ExpressionLazyVar (const std::vector< LazyInvoker > &methods)
 
virtual double value (const edm::ObjectWithDict &o) const
 
 ~ExpressionLazyVar ()
 
- Public Member Functions inherited from reco::parser::ExpressionBase
virtual ~ExpressionBase ()
 

Private Attributes

std::vector< LazyInvokermethods_
 
std::vector< edm::ObjectWithDictobjects_
 

Detailed Description

Same as ExpressionVar but with lazy resolution of object methods using the final type of the object, and not the one fixed at compile time

Definition at line 52 of file ExpressionVar.h.

Constructor & Destructor Documentation

ExpressionLazyVar::ExpressionLazyVar ( const std::vector< LazyInvoker > &  methods)

Definition at line 138 of file ExpressionVar.cc.

138  :
139  methods_(methods)
140 {
141 }
std::vector< LazyInvoker > methods_
Definition: ExpressionVar.h:59
ExpressionLazyVar::~ExpressionLazyVar ( )

Definition at line 143 of file ExpressionVar.cc.

144 {
145 }

Member Function Documentation

double ExpressionLazyVar::value ( const edm::ObjectWithDict o) const
virtual

Implements reco::parser::ExpressionBase.

Definition at line 148 of file ExpressionVar.cc.

References methods_, python.connectstrParser::o, objects_, cmsRelvalreport::red(), and run_regression::ret.

Referenced by Types.int32::__nonzero__(), Types.uint32::__nonzero__(), Types.int64::__nonzero__(), Types.uint64::__nonzero__(), Types.double::__nonzero__(), Types.bool::__nonzero__(), Types.string::__nonzero__(), average.Average::average(), Vispa.Views.PropertyView.FileProperty::buttonClicked(), Types.string::configValue(), Types.FileInPath::configValue(), Mixins.UsingBlock::dumpPython(), Types.int32::insertInto(), Types.uint32::insertInto(), Types.int64::insertInto(), Types.uint64::insertInto(), Mixins.UsingBlock::insertInto(), Types.double::insertInto(), Types.bool::insertInto(), Types.string::insertInto(), Types.FileInPath::insertInto(), Types.vint32::insertInto(), Types.vuint32::insertInto(), Types.vint64::insertInto(), Types.vuint64::insertInto(), Types.vdouble::insertInto(), Types.vbool::insertInto(), Types.vstring::insertInto(), and Vispa.Views.PropertyView.FileProperty::labelDoubleClicked().

148  {
149  std::vector<LazyInvoker>::const_iterator it, ed = methods_.end()-1;
150  edm::ObjectWithDict ro = o;
151  for (it = methods_.begin(); it < ed; ++it) {
152  ro = it->invoke(ro, objects_);
153  }
154  double ret = it->invokeLast(ro, objects_);
155  std::vector<edm::ObjectWithDict>::reverse_iterator rit, red = objects_.rend();
156  for (rit = objects_.rbegin(); rit != red; ++rit) {
157  rit->typeOf().destruct(rit->address(), false);
158  }
159  objects_.clear();
160  return ret;
161 }
std::vector< LazyInvoker > methods_
Definition: ExpressionVar.h:59
std::vector< edm::ObjectWithDict > objects_
Definition: ExpressionVar.h:60

Member Data Documentation

std::vector<LazyInvoker> reco::parser::ExpressionLazyVar::methods_
private

Definition at line 59 of file ExpressionVar.h.

Referenced by value().

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

Definition at line 60 of file ExpressionVar.h.

Referenced by value().