2 #include <clang/AST/Decl.h>
8 class python_generator
: public generator
{
13 python_generator(SourceManager
&SM
, set
<RecordDecl
*> &exported_types
,
14 set
<FunctionDecl
*> exported_functions
,
15 set
<FunctionDecl
*> functions
) :
16 generator(SM
, exported_types
, exported_functions
, functions
) {}
18 virtual void generate();
21 void print(const isl_class
&clazz
);
22 void print_method_header(bool is_static
, const string
&name
, int n_arg
);
23 void print_class_header(const isl_class
&clazz
, const string
&name
,
24 const vector
<string
> &super
);
25 void print_type_check(const string
&type
, int pos
, bool upcast
,
26 const string
&super
, const string
&name
, int n
);
27 void print_copy(QualType type
);
28 void print_callback(ParmVarDecl
*param
, int arg
);
29 void print_arg_in_call(FunctionDecl
*fd
, int arg
, int skip
);
30 void print_argtypes(FunctionDecl
*fd
);
31 void print_method_return(FunctionDecl
*method
);
32 void print_restype(FunctionDecl
*fd
);
33 void print(map
<string
, isl_class
> &classes
, set
<string
> &done
);
34 void print_constructor(const isl_class
&clazz
, FunctionDecl
*method
);
35 void print_representation(const isl_class
&clazz
,
36 const string
&python_name
);
37 void print_method_type(FunctionDecl
*fd
);
38 void print_method_types(const isl_class
&clazz
);
39 void print_method(const isl_class
&clazz
, FunctionDecl
*method
,
40 vector
<string
> super
);
41 void print_method_overload(const isl_class
&clazz
,
42 FunctionDecl
*method
);
43 void print_method(const isl_class
&clazz
, const string
&fullname
,
44 const set
<FunctionDecl
*> &methods
, vector
<string
> super
);