25 const std::vector<AnyMethodArgument>&
args,
26 std::vector<AnyMethodArgument>& fixuppedArgs) {
47 if (mem.
name().substr(0, 2) ==
"__") {
65 if ((args.size() < minArgs) || (args.size() > maxArgs)) {
81 std::vector<AnyMethodArgument> tmpFixups;
83 for (
auto const& param : mem) {
85 std::pair<AnyMethodArgument, int> fixup =
95 if (fixup.second >= 0) {
96 tmpFixups.push_back(fixup.first);
97 casts += fixup.second;
101 if (++i == args.size()) {
105 fixuppedArgs.swap(tmpFixups);
126 typedef std::pair<int, edm::FunctionWithDict>
OK;
128 bool nCasts(
const OK&
a,
const OK&
b) {
return a.first < b.first; }
132 const std::vector<AnyMethodArgument>&
args,
133 std::vector<AnyMethodArgument>& fixuppedArgs,
134 const char* iIterator,
147 if (theType == type) {
155 std::pair<edm::FunctionWithDict, bool>
mem;
159 std::vector<std::pair<int, edm::FunctionWithDict> > oks;
161 for (
auto const&
item : args) {
162 if (!theArgs.empty()) {
169 int casts =
checkMethod(f, type, args, fixuppedArgs);
171 oks.push_back(std::make_pair(casts, f));
181 for (
auto const&
F : functions) {
186 int casts =
checkMethod(f, type, args, fixuppedArgs);
188 oks.push_back(std::make_pair(casts, f));
202 if (oks.size() > 1) {
204 sort(oks.begin(), oks.end(),
nCasts);
207 <<
"Can't resolve method \"" << name <<
"\" for class \"" << type.
name() <<
"\", the two candidates " 208 << oks[0].second.name() <<
" and " << oks[1].second.name()
209 <<
" require the same number of integer->real conversions (" << oks[0].first <<
").";
213 fixuppedArgs.clear();
216 mem.first = oks.front().second;
222 if (!
bool(mem.first)) {
224 for (
auto const&
B : bases) {
226 if (
bool(mem.first)) {
236 if (!
bool(mem.first)) {
240 if (!name.compare(
"edm::Ref") || !name.compare(
"edm::RefToBase") || !name.compare(
"edm::Ptr")) {
242 std::vector<AnyMethodArgument>
empty;
243 std::vector<AnyMethodArgument> empty2;
245 mem =
findMethod(type,
"get", empty, empty2, iIterator, error);
246 if (!
bool(mem.first)) {
247 throw parser::Exception(iIterator) <<
"No member \"get\" in reference of type \"" << type.
name() <<
"\".";
257 if (
bool(mem.first)) {
TypeWithDict finalType() const
bool isConstructor() const
reco::parser::AnyMethodArgument AnyMethodArgument
boost::mpl::if_< matches_another_integral_type< unsigned long >, boost::variant< int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t, uint64_t, double, float, std::string >, boost::variant< int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t, uint64_t, unsigned long, double, float, std::string > >::type AnyMethodArgument
TypeWithDict toType() const
std::string templateName() const
bool isTemplateInstance() const
static bool fatalErrorCondition(const int err)
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)
uint16_t mem[nChs][nEvts]
static const std::string B
FunctionWithDict functionMemberByName(std::string const &) const
std::pair< int, edm::FunctionWithDict > OK
int checkMethod(const edm::FunctionWithDict &mem, const edm::TypeWithDict &type, const std::vector< AnyMethodArgument > &args, std::vector< AnyMethodArgument > &fixuppedArgs)
TypeWithDict & stripConstRef()
size_t functionParameterSize(bool required=false) const
bool isDestructor() const
static uInt32 F(BLOWFISH_CTX *ctx, uInt32 x)
bool nCasts(const OK &a, const OK &b)
std::string className(const T &t)