CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
reco::parser::ExpressionLazyVar Class Reference

#include <ExpressionVar.h>

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

Public Member Functions

 ExpressionLazyVar (const std::vector< LazyInvoker > &methods)
 
double value (const edm::ObjectWithDict &) const override
 
 ~ExpressionLazyVar () override
 
- 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 dynamic type of the object, and not the one fixed at compile time

Definition at line 61 of file ExpressionVar.h.

Constructor & Destructor Documentation

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

Definition at line 213 of file ExpressionVar.cc.

214  : methods_(methods)
215 {
216 }
std::vector< LazyInvoker > methods_
Definition: ExpressionVar.h:63
ExpressionLazyVar::~ExpressionLazyVar ( )
override

Definition at line 218 of file ExpressionVar.cc.

219 {
220 }

Member Function Documentation

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

Implements reco::parser::ExpressionBase.

Definition at line 223 of file ExpressionVar.cc.

References edm::ObjectWithDict::destruct(), Exhume::I, methods_, connectstrParser::o, objects_, and heppy_batch::val.

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(), Types.double::insertInto(), Mixins.UsingBlock::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().

224 {
226  std::vector<LazyInvoker>::const_iterator I = methods_.begin();
227  std::vector<LazyInvoker>::const_iterator E = methods_.end() - 1;
228  for (; I < E; ++I) {
229  val = I->invoke(val, objects_);
230  }
231  double ret = I->invokeLast(val, objects_);
232  for (std::vector<edm::ObjectWithDict>::reverse_iterator RI =
233  objects_.rbegin(), RE = objects_.rend(); RI != RE; ++RI) {
234  RI->destruct(false);
235  }
236  objects_.clear();
237  return ret;
238 }
const std::complex< double > I
Definition: I.h:8
void destruct(bool dealloc) const
std::vector< edm::ObjectWithDict > objects_
Definition: ExpressionVar.h:64
std::vector< LazyInvoker > methods_
Definition: ExpressionVar.h:63

Member Data Documentation

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

Definition at line 63 of file ExpressionVar.h.

Referenced by value().

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

Definition at line 64 of file ExpressionVar.h.

Referenced by value().