26 const std::vector<AnyMethodArgument>&
args,
27 std::vector<AnyMethodArgument>& fixuppedArgs) {
29 if (
mem.isConstructor()) {
32 if (
mem.isDestructor()) {
39 if (!
mem.isPublic()) {
48 if (
mem.name().substr(0, 2) ==
"__") {
64 size_t minArgs =
mem.functionParameterSize(
true);
65 size_t maxArgs =
mem.functionParameterSize(
false);
66 if ((
args.size() < minArgs) || (
args.size() > maxArgs)) {
82 std::vector<AnyMethodArgument> tmpFixups;
84 for (
auto const& param :
mem) {
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;
132 const std::vector<AnyMethodArgument>&
args,
133 std::vector<AnyMethodArgument>& fixuppedArgs,
134 const char* iIterator,
142 while (
type.isPointer() ||
type.isReference()) {
145 while (
type.isTypedef()) {
147 if (theType ==
type) {
155 std::pair<edm::FunctionWithDict, bool>
mem;
159 std::vector<std::pair<int, edm::FunctionWithDict> > oks;
162 if (!theArgs.empty()) {
165 theArgs +=
edm::TypeID(std::visit([](
auto& variant) ->
const std::type_info& {
return typeid(variant); },
item))
172 oks.push_back(std::make_pair(casts,
f));
189 oks.push_back(std::make_pair(casts,
f));
203 if (oks.size() > 1) {
208 <<
"Can't resolve method \"" <<
name <<
"\" for class \"" <<
type.name() <<
"\", the two candidates " 209 << oks[0].second.name() <<
" and " << oks[1].second.name()
210 <<
" require the same number of integer->real conversions (" << oks[0].first <<
").";
214 fixuppedArgs.clear();
217 mem.first = oks.front().second;
223 if (!
bool(
mem.first)) {
225 for (
auto const&
B : bases) {
227 if (
bool(
mem.first)) {
237 if (!
bool(
mem.first)) {
239 if (
type.isTemplateInstance()) {
241 if (!
name.compare(
"edm::Ref") || !
name.compare(
"edm::RefToBase") || !
name.compare(
"edm::Ptr")) {
243 std::vector<AnyMethodArgument>
empty;
244 std::vector<AnyMethodArgument> empty2;
247 if (!
bool(
mem.first)) {
248 throw parser::Exception(iIterator) <<
"No member \"get\" in reference of type \"" <<
type.name() <<
"\".";
258 if (
bool(
mem.first)) {
reco::parser::AnyMethodArgument AnyMethodArgument
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]
std::pair< int, edm::FunctionWithDict > OK
std::string const & className() const
int checkMethod(const edm::FunctionWithDict &mem, const edm::TypeWithDict &type, const std::vector< AnyMethodArgument > &args, std::vector< AnyMethodArgument > &fixuppedArgs)
TypeWithDict & stripConstRef()
std::conditional< matches_another_integral_type< unsigned long >::value, std::variant< int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t, uint64_t, double, float, std::string >, std::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
static uInt32 F(BLOWFISH_CTX *ctx, uInt32 x)
bool nCasts(const OK &a, const OK &b)
TypeWithDict finalType() const