17 objects_.resize(methods_.size());
18 std::vector<edm::ObjectWithDict>::iterator IO = objects_.begin();
19 for (std::vector<MethodInvoker>::const_iterator
I = methods_.begin(), E = methods_.end();
I != E; ++IO, ++
I) {
20 if (
I->isFunction()) {
22 needsDestructor_.push_back(makeStorage(*IO, retType));
26 needsDestructor_.push_back(
false);
40 : methods_(rhs.methods_)
41 , retType_(rhs.retType_)
48 for (std::vector<edm::ObjectWithDict>::iterator
I =
objects_.begin(),
63 void**
p =
static_cast<void**
>(obj.
address());
79 if (retType == tVoid) {
147 std::vector<edm::ObjectWithDict>::iterator IO =
objects_.begin();
148 for (std::vector<MethodInvoker>::const_iterator
I =
methods_.begin(), E =
methods_.end();
I != E; ++
I, ++IO) {
149 val =
I->invoke(val, *IO);
153 for (std::vector<edm::ObjectWithDict>::reverse_iterator RI =
objects_.rbegin(), RE =
objects_.rend(); RI != RE; ++RIB, ++RI) {
170 ret = *
static_cast<double*
>(addr);
173 ret = *
static_cast<float*
>(addr);
176 ret = *
static_cast<int*
>(addr);
179 ret = *
static_cast<unsigned int*
>(addr);
182 ret = *
static_cast<short*
>(addr);
185 ret = *
static_cast<unsigned short*
>(addr);
188 ret = *
static_cast<long*
>(addr);
191 ret = *
static_cast<unsigned long*
>(addr);
194 ret = *
static_cast<char*
>(addr);
197 ret = *
static_cast<unsigned char*
>(addr);
200 ret = *
static_cast<bool*
>(addr);
203 ret = *
static_cast<int*
>(addr);
207 assert(
false &&
"objToDouble: invalid type!");
226 std::vector<LazyInvoker>::const_iterator
I =
methods_.begin();
227 std::vector<LazyInvoker>::const_iterator E =
methods_.end() - 1;
232 for (std::vector<edm::ObjectWithDict>::reverse_iterator RI =
static ObjectWithDict byType(TypeWithDict const &)
static bool makeStorage(edm::ObjectWithDict &obj, const edm::TypeWithDict &retType)
std::vector< edm::ObjectWithDict > objects_
static double objToDouble(const edm::ObjectWithDict &obj, method::TypeCode type)
virtual double value(const edm::ObjectWithDict &) const
method::TypeCode retType_
static TypeWithDict byName(std::string const &name)
TypeWithDict typeOf() const
ExpressionLazyVar(const std::vector< LazyInvoker > &methods)
ExpressionVar(const std::vector< MethodInvoker > &methods, method::TypeCode retType)
static bool isValidReturnType(method::TypeCode)
std::vector< MethodInvoker > methods_
const std::complex< double > I
void deallocate(void *address) const
static void delStorage(edm::ObjectWithDict &)
virtual double value(const edm::ObjectWithDict &) const
Evaluate an object's method or datamember (or chain of them) to get a number.
std::vector< edm::ObjectWithDict > objects_
std::vector< bool > needsDestructor_
std::vector< LazyInvoker > methods_