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 Reflex::Object &o) const
 
 ~ExpressionLazyVar ()
 
- Public Member Functions inherited from reco::parser::ExpressionBase
virtual ~ExpressionBase ()
 

Private Attributes

std::vector< LazyInvokermethods_
 
std::vector< Reflex::Object > objects_
 

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 53 of file ExpressionVar.h.

Constructor & Destructor Documentation

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

Definition at line 152 of file ExpressionVar.cc.

152  :
153  methods_(methods)
154 {
155 }
std::vector< LazyInvoker > methods_
Definition: ExpressionVar.h:60
ExpressionLazyVar::~ExpressionLazyVar ( )

Definition at line 157 of file ExpressionVar.cc.

158 {
159 }

Member Function Documentation

double ExpressionLazyVar::value ( const Reflex::Object &  o) const
virtual

Implements reco::parser::ExpressionBase.

Definition at line 162 of file ExpressionVar.cc.

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

Referenced by 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().

162  {
163  std::vector<LazyInvoker>::const_iterator it, ed = methods_.end()-1;
164  Reflex::Object ro = o;
165  for (it = methods_.begin(); it < ed; ++it) {
166  ro = it->invoke(ro, objects_);
167  }
168  double ret = it->invokeLast(ro, objects_);
169  std::vector<Reflex::Object>::reverse_iterator rit, red = objects_.rend();
170  for (rit = objects_.rbegin(); rit != red; ++rit) {
171  rit->TypeOf().Destruct(rit->Address(), false);
172  }
173  objects_.clear();
174  return ret;
175 }
std::vector< Reflex::Object > objects_
Definition: ExpressionVar.h:61
std::vector< LazyInvoker > methods_
Definition: ExpressionVar.h:60

Member Data Documentation

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

Definition at line 60 of file ExpressionVar.h.

Referenced by value().

std::vector<Reflex::Object> reco::parser::ExpressionLazyVar::objects_
mutableprivate

Definition at line 61 of file ExpressionVar.h.

Referenced by value().