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) {
49 if (
obj.typeOf().isPointer() ||
obj.typeOf().isReference()) {
51 void**
p =
static_cast<void**
>(
obj.address());
56 obj.typeOf().deallocate(
obj.address());
63 if (retType == tVoid) {
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) {
133 for (std::vector<edm::ObjectWithDict>::reverse_iterator RI =
objects_.rbegin(), RE =
objects_.rend(); RI != RE;
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 &)
static bool makeStorage(edm::ObjectWithDict &obj, const edm::TypeWithDict &retType)
ret
prodAgent to be discontinued
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)
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
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_