25 const std::vector<AnyMethodArgument> &
args, std::vector<AnyMethodArgument> &fixuppedArgs) {
46 std::vector<AnyMethodArgument> tmpFixups;
48 for (
auto const& param : mem) {
52 if (fixup.second >= 0) {
53 tmpFixups.push_back(fixup.first);
54 casts += fixup.second;
58 if(++i == args.size()) {
62 fixuppedArgs.swap(tmpFixups);
70 typedef pair<int,edm::FunctionWithDict>
OK;
72 return a.first < b.first;
78 const std::vector<AnyMethodArgument> &
args,
79 std::vector<AnyMethodArgument> &fixuppedArgs,
80 const char* iIterator,
86 <<
"No dictionary for class \"" << type.
name() <<
"\".";
90 pair<edm::FunctionWithDict, bool>
mem; mem.second =
false;
93 vector<pair<int,edm::FunctionWithDict> > oks;
97 for(
auto const&
function : functions) {
100 int casts =
checkMethod(m, type, args, fixuppedArgs);
102 oks.push_back( make_pair(casts,m) );
115 if (oks.size() > 1) {
121 <<
"Can't resolve method \"" << name <<
"\" for class \"" << type.
name() <<
"\", the two candidates "
122 << oks[0].second.name() <<
" and " << oks[1].second.name()
123 <<
" require the same number of integer->real conversions (" << oks[0].first <<
").";
127 fixuppedArgs.clear();
130 mem.first = oks.front().second;
137 for(
auto const&
base : bases) {
152 if(name.compare(
"edm::Ref") == 0 ||
153 name.compare(
"edm::RefToBase") == 0 ||
154 name.compare(
"edm::Ptr") == 0) {
156 std::vector<AnyMethodArgument>
empty, empty2;
158 mem =
findMethod(type,
"get", empty, empty2,iIterator,error);
161 <<
"No member \"get\" in reference of type \"" << type.
name() <<
"\".";
pair< int, edm::FunctionWithDict > OK
bool isConstructor() const
pair< edm::FunctionWithDict, bool > findMethod(const edm::TypeWithDict &t, const string &name, const std::vector< AnyMethodArgument > &args, std::vector< AnyMethodArgument > &fixuppedArgs, const char *iIterator, int &oError)
TypeWithDict declaringType() const
bool nCasts(OK const &a, OK const &b)
static bool fatalErrorCondition(int iError)
TypeWithDict toType() const
std::string templateName() const
bool isTemplateInstance() const
uint16_t mem[nChs][nEvts]
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
int checkMethod(const edm::FunctionWithDict &mem, const edm::TypeWithDict &type, const std::vector< AnyMethodArgument > &args, std::vector< AnyMethodArgument > &fixuppedArgs)
std::type_info const & id() const
size_t functionParameterSize(bool required=false) const
bool isDestructor() const