16 objects_.resize(methods_.size());
17 std::vector<edm::ObjectWithDict>::iterator IO = objects_.begin();
18 for (std::vector<MethodInvoker>::const_iterator
I = methods_.begin(), E = methods_.end();
I != E; ++IO, ++
I) {
19 if (
I->isFunction()) {
21 needsDestructor_.push_back(makeStorage(*IO, retType));
24 needsDestructor_.push_back(
false);
30 : methods_(methods), retType_(retType) {
39 for (std::vector<edm::ObjectWithDict>::iterator
I =
objects_.begin(), E =
objects_.end();
I != E; ++
I) {
51 void**
p =
static_cast<void**
>(obj.
address());
63 if (retType == tVoid) {
79 using namespace method;
127 std::vector<edm::ObjectWithDict>::iterator IO =
objects_.begin();
128 for (std::vector<MethodInvoker>::const_iterator
I =
methods_.begin(), E =
methods_.end();
I != E; ++
I, ++IO) {
129 val =
I->invoke(val, *IO);
133 for (std::vector<edm::ObjectWithDict>::reverse_iterator RI =
objects_.rbegin(), RE =
objects_.rend(); RI != RE;
143 using namespace method;
148 ret = *
static_cast<double*
>(
addr);
151 ret = *
static_cast<float*
>(
addr);
154 ret = *
static_cast<int*
>(
addr);
157 ret = *
static_cast<unsigned int*
>(
addr);
160 ret = *
static_cast<short*
>(
addr);
163 ret = *
static_cast<unsigned short*
>(
addr);
166 ret = *
static_cast<long*
>(
addr);
169 ret = *
static_cast<unsigned long*
>(
addr);
172 ret = *
static_cast<char*
>(
addr);
175 ret = *
static_cast<unsigned char*
>(
addr);
178 ret = *
static_cast<bool*
>(
addr);
181 ret = *
static_cast<int*
>(
addr);
185 assert(
false &&
"objToDouble: invalid type!");
197 std::vector<LazyInvoker>::const_iterator
I =
methods_.begin();
198 std::vector<LazyInvoker>::const_iterator E =
methods_.end() - 1;
203 for (std::vector<edm::ObjectWithDict>::reverse_iterator RI =
objects_.rbegin(), RE =
objects_.rend(); RI != RE;
static ObjectWithDict byType(TypeWithDict const &)
tuple ret
prodAgent to be discontinued
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)
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
~ExpressionVar() override
void deallocate(void *address) const
double value(const edm::ObjectWithDict &) const override
static void delStorage(edm::ObjectWithDict &)
double value(const edm::ObjectWithDict &) const override
Evaluate an object's method or datamember (or chain of them) to get a number.
~ExpressionLazyVar() override
std::vector< edm::ObjectWithDict > objects_
std::vector< bool > needsDestructor_
std::vector< LazyInvoker > methods_