12 methods_(methods), retType_(retType) {
17 methods_(other.methods_), retType_(other.retType_) {
22 for(std::vector<edm::ObjectWithDict>::iterator it =
objects_.begin(); it !=
objects_.end(); ++it) {
33 void **
p =
static_cast<void **
>(obj.
address());
44 std::vector<MethodInvoker>::const_iterator it =
methods_.begin(), ed =
methods_.end();
45 std::vector<edm::ObjectWithDict>::iterator itobj =
objects_.begin();
46 for (; it != ed; ++it, ++itobj) {
47 if(it->isFunction()) {
61 if (retType == tVoid) {
100 std::vector<MethodInvoker>::const_iterator itm,
end =
methods_.end();
101 std::vector<edm::ObjectWithDict>::iterator ito;
103 ro = itm->invoke(ro, *ito);
106 std::vector<edm::ObjectWithDict>::reverse_iterator rito, rend =
objects_.rend();;
107 std::vector<bool>::const_reverse_iterator ritb;
109 if (*ritb) rito->typeOf().destruct(rito->address(),
false);
120 case(
doubleType) :
ret = *
static_cast<double *
>(addr);
break;
121 case(
floatType ) :
ret = *
static_cast<float *
>(addr);
break;
122 case(
intType ) :
ret = *
static_cast<int *
>(addr);
break;
123 case(
uIntType ) :
ret = *
static_cast<unsigned int *
>(addr);
break;
124 case(
shortType ) :
ret = *
static_cast<short *
>(addr);
break;
125 case(
uShortType) :
ret = *
static_cast<unsigned short *
>(addr);
break;
126 case(
longType ) :
ret = *
static_cast<long *
>(addr);
break;
127 case(
uLongType ) :
ret = *
static_cast<unsigned long *
>(addr);
break;
128 case(
charType ) :
ret = *
static_cast<char *
>(addr);
break;
129 case(
uCharType ) :
ret = *
static_cast<unsigned char *
>(addr);
break;
130 case(
boolType ) :
ret = *
static_cast<bool *
>(addr);
break;
131 case(
enumType ) :
ret = *
static_cast<int *
>(addr);
break;
149 std::vector<LazyInvoker>::const_iterator it, ed =
methods_.end()-1;
151 for (it =
methods_.begin(); it < ed; ++it) {
155 std::vector<edm::ObjectWithDict>::reverse_iterator rit,
red =
objects_.rend();
157 rit->typeOf().destruct(rit->address(),
false);
static ObjectWithDict byType(TypeWithDict const &type)
virtual double value(const edm::ObjectWithDict &o) const
static TypeWithDict byName(std::string const &className)
ExpressionLazyVar(const std::vector< LazyInvoker > &methods)
static bool makeStorage(edm::ObjectWithDict &obj, const edm::TypeWithDict &retType)
static void delStorage(edm::ObjectWithDict &obj)
std::vector< LazyInvoker > methods_
ExpressionVar(const std::vector< MethodInvoker > &methods, method::TypeCode retType)
std::vector< bool > needsDestructor_
static bool isValidReturnType(method::TypeCode)
static double objToDouble(const edm::ObjectWithDict &obj, method::TypeCode type)
TypeWithDict const & typeOf() const
virtual double value(const edm::ObjectWithDict &o) const
std::vector< edm::ObjectWithDict > objects_
std::vector< MethodInvoker > methods_
std::vector< edm::ObjectWithDict > objects_
void deallocate(void *obj) const
Evaluate an object's method or datamember (or chain of them) to get a number.
method::TypeCode retType_