isl_multi_templ.c: extract out isl_multi_dims.c
[isl.git] / interface / cpp.h
blob3d8d6603c92f8fba1b18d8abe94a808d857fe196
1 #include "generator.h"
3 using namespace std;
4 using namespace clang;
6 class cpp_generator : public generator {
7 public:
8 cpp_generator(set<RecordDecl *> &exported_types,
9 set<FunctionDecl *> exported_functions,
10 set<FunctionDecl *> functions) :
11 generator(exported_types, exported_functions, functions) {}
13 enum function_kind {
14 function_kind_static_method,
15 function_kind_member_method,
16 function_kind_constructor,
19 virtual void generate();
20 private:
21 void print_file(ostream &os, std::string filename);
22 void print_forward_declarations(ostream &os);
23 void print_declarations(ostream &os);
24 void print_class(ostream &os, const isl_class &clazz);
25 void print_class_forward_decl(ostream &os, const isl_class &clazz);
26 void print_class_factory_decl(ostream &os, const isl_class &clazz,
27 const std::string &prefix = std::string());
28 void print_private_constructors_decl(ostream &os,
29 const isl_class &clazz);
30 void print_copy_assignment_decl(ostream &os, const isl_class &clazz);
31 void print_public_constructors_decl(ostream &os,
32 const isl_class &clazz);
33 void print_constructors_decl(ostream &os, const isl_class &clazz);
34 void print_destructor_decl(ostream &os, const isl_class &clazz);
35 void print_ptr_decl(ostream &os, const isl_class &clazz);
36 void print_get_ctx_decl(ostream &os);
37 void print_methods_decl(ostream &os, const isl_class &clazz);
38 void print_method_group_decl(ostream &os, const isl_class &clazz,
39 const string &fullname, const set<FunctionDecl *> &methods);
40 void print_method_decl(ostream &os, const isl_class &clazz,
41 const string &fullname, FunctionDecl *method,
42 function_kind kind);
43 void print_implementations(ostream &os);
44 void print_class_impl(ostream &os, const isl_class &clazz);
45 void print_class_factory_impl(ostream &os, const isl_class &clazz);
46 void print_private_constructors_impl(ostream &os,
47 const isl_class &clazz);
48 void print_public_constructors_impl(ostream &os,
49 const isl_class &clazz);
50 void print_constructors_impl(ostream &os, const isl_class &clazz);
51 void print_copy_assignment_impl(ostream &os, const isl_class &clazz);
52 void print_destructor_impl(ostream &os, const isl_class &clazz);
53 void print_ptr_impl(ostream &os, const isl_class &clazz);
54 void print_get_ctx_impl(ostream &os, const isl_class &clazz);
55 void print_methods_impl(ostream &os, const isl_class &clazz);
56 void print_method_group_impl(ostream &os, const isl_class &clazz,
57 const string &fullname, const set<FunctionDecl *> &methods);
58 void print_method_impl(ostream &os, const isl_class &clazz,
59 const string &fullname, FunctionDecl *method,
60 function_kind kind);
61 void print_method_param_use(ostream &os, ParmVarDecl *param,
62 bool load_from_this_ptr);
63 void print_method_header(ostream &os, const isl_class &clazz,
64 FunctionDecl *method, const string &fullname,
65 bool is_declaration, function_kind kind);
66 string generate_callback_args(QualType type, bool cpp);
67 string generate_callback_type(QualType type);
68 void print_callback_local(ostream &os, ParmVarDecl *param);
69 std::string rename_method(std::string name);
70 string type2cpp(const isl_class &clazz);
71 string type2cpp(string type_string);
72 string type2cpp(QualType type);
73 bool is_implicit_conversion(const isl_class &clazz, FunctionDecl *cons);
74 bool is_subclass(QualType subclass_type, const isl_class &class_type);
75 function_kind get_method_kind(const isl_class &clazz,
76 FunctionDecl *method);