16 string name(begin, end);
18 if ((*begin ==
'[') || (*begin ==
'(')) {
19 name.insert(0,
"operator..");
22 name[9] = name[name.size() - 1];
24 name[name.size() - 1] =
')';
29 std::vector<AnyMethodArgument>
args;
30 if (parenthesis != string::npos) {
31 name.erase(parenthesis, name.size());
32 if (intStack_.empty()) {
33 throw Exception(begin) <<
"expected method argument, but non given.";
35 for (vector<AnyMethodArgument>::const_iterator
i = intStack_.begin();
i != intStack_.end(); ++
i) {
41 if (endOfExpr != string::npos) {
42 name.erase(endOfExpr, name.size());
51 push(name, args, begin);
59 vector<AnyMethodArgument> fixups;
61 pair<edm::FunctionWithDict, bool>
mem =
reco::findMethod(type, name, args, fixups, begin, error);
62 if (
bool(mem.first)) {
67 throw Exception(begin) <<
"member \"" << mem.first.name() <<
"\" return type is invalid:\n"
68 <<
" return type: \"" << mem.first.typeName() <<
"\"\n";
70 typeStack_.push_back(retType);
82 push(name, args, begin);
95 throw Exception(begin) <<
"method named \"" << name <<
"\" for type \"" << type.
name()
96 <<
"\" is not publically accessible.";
99 throw Exception(begin) <<
"method named \"" << name <<
"\" for type \"" << type.
name() <<
"\" is static.";
102 throw Exception(begin) <<
"method named \"" << name <<
"\" for type \"" << type.
name() <<
"\" is not const.";
105 throw Exception(begin) <<
"method named \"" << name <<
"\" for type \"" << type.
name()
106 <<
"\" was passed the wrong number of arguments.";
109 throw Exception(begin) <<
"method named \"" << name <<
"\" for type \"" << type.
name()
110 <<
"\" was passed the wrong types of arguments.";
113 throw Exception(begin) <<
"method named \"" << name <<
"\" for type \"" << type.
name()
114 <<
"\" is not usable in this context.";
125 ex <<
"no method or data member named \"" << name <<
"\" found for type \"" << type.
name() <<
"\"\n";
127 ex <<
"It has the following methods\n";
129 for (
auto const&
f : functions) {
130 ex <<
" " <<
f->GetName() <<
"\n";
132 ex <<
"and the following data members\n";
134 for (
auto const&
m : members) {
135 ex <<
" " <<
m->GetName() <<
"\n";
140 throw Exception(begin) <<
"data member named \"" << name <<
"\" for type \"" << type.
name()
141 <<
"\" is not publically accessible.";
144 throw Exception(begin) <<
"data member named \"" << name <<
"\" for type \"" << type.
name()
145 <<
"\" is not usable in this context.";
150 typeStack_.push_back(member.
typeOf());
edm::MemberWithDict findDataMember(const edm::TypeWithDict &iType, const std::string &iName, int &oError)
Keeps different SingleInvokers for each dynamic type of the objects passed to invoke() ...
std::pair< edm::FunctionWithDict, bool > findMethod(const edm::TypeWithDict &t, const std::string &name, const std::vector< AnyMethodArgument > &args, std::vector< AnyMethodArgument > &fixuppedArgs, const char *iIterator, int &oError)
edm::TypeWithDict returnType(const edm::FunctionWithDict &)
bool push(const std::string &, const std::vector< AnyMethodArgument > &, const char *, bool deep=true) const
TypeWithDict typeOf() const
uint16_t mem[nChs][nEvts]
void operator()(const char *, const char *) const