32 const std::vector<AnyMethodArgument>&
args,
33 std::vector<AnyMethodArgument>& fixuppedArgs)
55 if (mem.
name().substr(0, 2) ==
"__") {
73 if ((args.size() < minArgs) || (args.size() > maxArgs)) {
89 std::vector<AnyMethodArgument> tmpFixups;
91 for (
auto const& param : mem) {
93 std::pair<AnyMethodArgument, int> fixup =
104 if (fixup.second >= 0) {
105 tmpFixups.push_back(fixup.first);
106 casts += fixup.second;
111 if (++i == args.size()) {
115 fixuppedArgs.swap(tmpFixups);
136 typedef std::pair<int, edm::FunctionWithDict>
OK;
141 return a.first < b.first;
144 std::pair<edm::FunctionWithDict, bool>
147 const std::vector<AnyMethodArgument>&
args,
148 std::vector<AnyMethodArgument>& fixuppedArgs,
149 const char* iIterator,
156 type.
name() <<
"\".";
163 if(theType == type) {
171 std::pair<edm::FunctionWithDict, bool>
mem;
175 std::vector<std::pair<int, edm::FunctionWithDict> > oks;
177 for(
auto const& item : args) {
178 if(!theArgs.empty()) {
185 int casts =
checkMethod(f, type, args, fixuppedArgs);
187 oks.push_back(std::make_pair(casts, f));
197 for (
auto const&
F : functions) {
202 int casts =
checkMethod(f, type, args, fixuppedArgs);
204 oks.push_back(std::make_pair(casts, f));
218 if (oks.size() > 1) {
220 sort(oks.begin(), oks.end(),
nCasts);
223 name <<
"\" for class \"" << type.
name() <<
224 "\", the two candidates " << oks[0].second.name() <<
" and " <<
225 oks[1].second.name() <<
226 " require the same number of integer->real conversions (" <<
227 oks[0].first <<
").";
231 fixuppedArgs.clear();
234 mem.first = oks.front().second;
240 if (!
bool(mem.first)) {
242 for (
auto const&
B : bases) {
244 fixuppedArgs, iIterator, baseError);
245 if (
bool(mem.first)) {
255 if (!
bool(mem.first)) {
259 if (!name.compare(
"edm::Ref") || !name.compare(
"edm::RefToBase") ||
260 !name.compare(
"edm::Ptr")) {
262 std::vector<AnyMethodArgument>
empty;
263 std::vector<AnyMethodArgument> empty2;
265 mem =
findMethod(type,
"get", empty, empty2, iIterator, error);
266 if (!
bool(mem.first)) {
268 "No member \"get\" in reference of type \"" <<
269 type.
name() <<
"\".";
279 if (
bool(mem.first)) {
TypeWithDict finalType() const
bool isConstructor() const
reco::parser::AnyMethodArgument 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
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
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)