Resolve the method, push a MethodInvoker on the MethodStack and it's return type to TypeStack (after stripping "*" and "&") This method is used also by the LazyInvoker to perform the fetch once the final type is known If the object is a Ref/Ptr/RefToBase and the method is not found in that class: 1) it pushes a no-argument 'get()' method 2) if deep = true, it attempts to resolve and push the method on the object to which the edm ref points to. In that case, the MethodStack will contain two more items after this call instead of just one. This behaviour is what you want for non-lazy parsing 2b) if instead deep = false, it just pushes the 'get' on the stack. this will allow the LazyInvoker to then re-discover the runtime type of the pointee The method will:
- throw exception, if the member can't be resolved
- return 'false' if deep = false and it only pushed a 'get' on the stack
- return true otherwise
Definition at line 44 of file MethodSetter.cc.
References error, edm::hlt::Exception, reco::findDataMember(), reco::findMethod(), reco::parser::kIsNotConst, reco::parser::kIsNotPublic, reco::parser::kIsStatic, reco::parser::kNameDoesNotExist, reco::parser::kWrongArgumentType, reco::parser::kWrongNumberOfArguments, mem, and reco::returnType().
Referenced by reco::parser::SingleInvoker::SingleInvoker().
46 vector<AnyMethodArgument> fixups;
53 <<
"member \"" << mem.first.Name() <<
"\" return type is invalid:\n"
54 <<
" member type: \"" << mem.first.TypeOf().Name() <<
"\"\n"
55 <<
" return type: \"" << mem.first.TypeOf().ReturnType().Name() <<
"\"\n";
74 <<
"method named \"" <<
name <<
"\" for type \""
75 <<type.Name() <<
"\" is not publically accessible.";
79 <<
"method named \"" <<
name <<
"\" for type \""
80 <<type.Name() <<
"\" is static.";
84 <<
"method named \"" <<
name <<
"\" for type \""
85 <<type.Name() <<
"\" is not const.";
89 <<
"method named \"" <<
name <<
"\" for type \""
90 <<type.Name() <<
"\" was passed the wrong number of arguments.";
94 <<
"method named \"" <<
name <<
"\" for type \""
95 <<type.Name() <<
"\" was passed the wrong types of arguments.";
99 <<
"method named \"" <<
name <<
"\" for type \""
100 <<type.Name() <<
"\" is not usable in this context.";
110 <<
"no method or data member named \"" <<
name <<
"\" found for type \""
111 <<type.Name() <<
"\"";
115 <<
"data member named \"" <<
name <<
"\" for type \""
116 <<type.Name() <<
"\" is not publically accessible.";
120 <<
"data member named \"" <<
name <<
"\" for type \""
121 <<type.Name() <<
"\" is not usable in this context.";
bool push(const std::string &, const std::vector< AnyMethodArgument > &, const char *, bool deep=true) const
Type returnType(const Member &mem)
uint16_t mem[nChs][nEvts]
pair< Member, bool > findMethod(const Type &t, const string &name, const std::vector< AnyMethodArgument > &args, std::vector< AnyMethodArgument > &fixuppedArgs, const char *iIterator, int &oError)
Reflex::Member findDataMember(const Reflex::Type &iType, const std::string &iName, int &oError)