Lines Matching refs:clazz
48 void cpp_generator::set_class_construction_types(isl_class &clazz) in set_class_construction_types() argument
50 for (const auto &cons : clazz.constructors) { in set_class_construction_types()
55 if (!is_implicit_conversion(Method(clazz, cons))) in set_class_construction_types()
61 clazz.construction_types.emplace(arg_type, param); in set_class_construction_types()
71 auto &clazz = kvp.second; in set_construction_types() local
72 set_class_construction_types(clazz); in set_construction_types()
101 static void copy_method(isl_class &clazz, const isl_class &super, in copy_method() argument
104 clazz.methods[name].insert(fd); in copy_method()
105 clazz.copied_from.emplace(fd, super); in copy_method()
106 clazz.copy_depth.emplace(fd, depth); in copy_method()
137 static int copy_depth(const isl_class &clazz, FunctionDecl *fd) in copy_depth() argument
139 if (clazz.copy_depth.count(fd) == 0) in copy_depth()
141 return clazz.copy_depth.at(fd); in copy_depth()
159 static bool is_overridden(FunctionDecl *fd, isl_class &clazz, in is_overridden() argument
162 if (clazz.methods.count(name) == 0) in is_overridden()
165 for (const auto &m : clazz.methods.at(name)) { in is_overridden()
168 if (copy_depth(clazz, m) <= depth) in is_overridden()
170 clazz.methods[name].erase(m); in is_overridden()
181 void cpp_generator::copy_methods(isl_class &clazz, const std::string &name, in copy_methods() argument
190 if (is_overridden(fd, clazz, name, depth)) in copy_methods()
192 copy_method(clazz, super, name, fd, depth); in copy_methods()
201 void cpp_generator::copy_super_methods(isl_class &clazz, const isl_class &super) in copy_super_methods() argument
207 copy_methods(clazz, name, super, methods); in copy_super_methods()
221 void cpp_generator::copy_super_methods(isl_class &clazz, set<string> &done) in copy_super_methods() argument
223 auto supers = find_superclasses(clazz.type); in copy_super_methods()
228 done.insert(clazz.name); in copy_super_methods()
233 if (super.construction_types.count(clazz.name) == 0) in copy_super_methods()
235 copy_super_methods(clazz, super); in copy_super_methods()
255 auto &clazz = kvp.second; in copy_super_methods() local
257 if (clazz.is_type_subclass()) in copy_super_methods()
259 if (done.count(clazz.name) != 0) in copy_super_methods()
261 copy_super_methods(clazz, done); in copy_super_methods()
279 for (const auto &cons : clazz.constructors) in print_constructors()
280 print_method(Method(clazz, cons)); in print_constructors()
287 for (const auto &kvp : clazz.methods) in print_methods()
299 for (const auto &set : clazz.set_enums.at(fd)) { in print_set_enums()
300 EnumMethod method(clazz, fd, set.method_name, set.name); in print_set_enums()
311 for (const auto &kvp : clazz.set_enums) in print_set_enums()
378 Method method(clazz, fd, name); in print_method_variants()
381 if (method.clazz.copied_from.count(method.fd) == 0) { in print_method_variants()
383 if (clazz.is_get_method(fd)) in print_method_variants()
386 auto super = method.clazz.copied_from.at(method.fd); in print_method_variants()
418 static FunctionDecl *single_local(const isl_class &clazz, in single_local() argument
425 if (!clazz.first_arg_matches_class(fn)) in single_local()
444 Method method(clazz, fd, name); in print_descendent_overloads()
475 local = single_local(clazz, methods); in print_method_group()
545 return clazz.is_type_subclass() && generator::is_mutator(clazz, fd); in is_subclass_mutator()
557 return cpp_generator::type2cpp(method.clazz); in return_type()
766 string cpp_generator::type2cpp(const isl_class &clazz) in type2cpp() argument
768 return type2cpp(clazz.subclass_name); in type2cpp()
917 const auto &clazz = cons.clazz; in is_implicit_conversion() local
925 if (is_isl_type(type) && !is_isl_ctx(type) && is_subclass(type, clazz)) in is_implicit_conversion()
953 static Method::Kind get_kind(const isl_class &clazz, FunctionDecl *method) in get_kind() argument
957 else if (generator::is_static(clazz, method)) in get_kind()
985 Method::Method(const isl_class &clazz, FunctionDecl *fd, in Method() argument
987 clazz(clazz), fd(fd), name(rename_method(name)), in Method()
988 kind(get_kind(clazz, fd)), in Method()
999 Method::Method(const isl_class &clazz, FunctionDecl *fd) : in Method() argument
1000 Method(clazz, fd, clazz.method_name(fd)) in Method()
1219 ConversionMethod(method, method.clazz.name, get_param) in ConversionMethod()
1258 if (clazz.name == this_type) { in print_call()
1271 EnumMethod::EnumMethod(const isl_class &clazz, FunctionDecl *fd, in EnumMethod() argument
1273 Method(clazz, fd, method_name), enum_name(enum_name) in EnumMethod()
1306 const isl_class &clazz, cpp_generator &generator, in class_printer() argument
1308 os(os), clazz(clazz), cppstring(type2cpp(clazz)), generator(generator), in class_printer()