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;
94 vector<pair<int,edm::FunctionWithDict> > oks;
98 for(
auto const&
function : functions) {
101 int casts =
checkMethod(m, type, args, fixuppedArgs);
103 oks.push_back( make_pair(casts,m) );
115 if (oks.empty() && err_fatal)
123 if (oks.size() > 1) {
129 <<
"Can't resolve method \"" << name <<
"\" for class \"" << type.
name() <<
"\", the two candidates "
130 << oks[0].second.name() <<
" and " << oks[1].second.name()
131 <<
" require the same number of integer->real conversions (" << oks[0].first <<
").";
135 fixuppedArgs.clear();
138 mem.first = oks.front().second;
145 for(
auto const&
base : bases) {
160 if(name.compare(
"edm::Ref") == 0 ||
161 name.compare(
"edm::RefToBase") == 0 ||
162 name.compare(
"edm::Ptr") == 0) {
164 std::vector<AnyMethodArgument>
empty, empty2;
166 mem =
findMethod(type,
"get", empty, empty2,iIterator,error);
169 <<
"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