Polly 20.0.0git
|
#include <cpp.h>
Classes | |
struct | list_combiner |
Public Types | |
enum | Kind { static_method , member_method , constructor } |
Public Member Functions | |
Method (const isl_class &clazz, FunctionDecl *fd, const std::string &name) | |
Method (const isl_class &clazz, FunctionDecl *fd) | |
int | c_num_params () const |
virtual int | num_params () const |
virtual bool | param_needs_copy (int pos) const |
virtual clang::ParmVarDecl * | get_param (int pos) const |
virtual void | print_param_use (ostream &os, int pos) const |
bool | is_subclass_mutator () const |
void | on_fd_arg_list (int start, int end, const list_combiner &combiner, const std::function< void(int i, int arg)> &on_arg) const |
void | print_fd_arg_list (std::ostream &os, int start, int end, const std::function< void(int i, int arg)> &print_arg) const |
void | on_cpp_arg_list (const list_combiner &combiner, const std::function< void(int i, int arg)> &on_arg) const |
void | on_cpp_arg_list (const std::function< void(int i, int arg)> &on_arg) const |
void | print_cpp_arg_list (std::ostream &os, const std::function< void(int i, int arg)> &print_arg) const |
Static Public Member Functions | |
static list_combiner | print_combiner (std::ostream &os) |
static list_combiner | empty_combiner () |
static void | on_arg_list (int start, int end, const list_combiner &combiner, const std::function< bool(int i)> &on_arg_skip_next) |
static void | print_arg_list (std::ostream &os, int start, int end, const std::function< bool(int i)> &print_arg_skip_next) |
Public Attributes | |
const isl_class & | clazz |
FunctionDecl *const | fd |
const std::string | name |
enum Kind | kind |
const std::vector< ParmVarDecl * > | callbacks |
enum Method::Kind |
Method::Method | ( | const isl_class & | clazz, |
FunctionDecl * | fd, | ||
const std::string & | name | ||
) |
Method::Method | ( | const isl_class & | clazz, |
FunctionDecl * | fd | ||
) |
int Method::c_num_params | ( | ) | const |
Definition at line 1010 of file cpp.cc.
References fd.
Referenced by num_params(), and plain_cpp_generator::impl_printer::print_method().
|
static |
Definition at line 944 of file cpp.cc.
Referenced by on_cpp_arg_list().
|
virtual |
Reimplemented in ConversionMethod.
Definition at line 1176 of file cpp.cc.
Referenced by ConversionMethod::ConversionMethod(), param_is_anon(), param_needs_copy(), NoCopyMethod::param_needs_copy(), and cpp_generator::class_printer::print_method_header().
bool Method::is_subclass_mutator | ( | ) | const |
Definition at line 543 of file cpp.cc.
References generator::is_mutator().
Referenced by plain_cpp_generator::impl_printer::print_method_return(), and cpp_type_printer::return_type().
|
virtual |
Reimplemented in EnumMethod.
Definition at line 1021 of file cpp.cc.
References c_num_params().
Referenced by EnumMethod::num_params(), on_cpp_arg_list(), plain_cpp_generator::impl_printer::print_argument_validity_check(), print_callback_lambdas(), cpp_generator::class_printer::print_method_variants(), plain_cpp_generator::impl_printer::print_save_ctx(), and total_params().
|
static |
Definition at line 1031 of file cpp.cc.
References Method::list_combiner::after, Method::list_combiner::before, and Method::list_combiner::between.
Referenced by on_fd_arg_list(), and print_arg_list().
void Method::on_cpp_arg_list | ( | const list_combiner & | combiner, |
const std::function< void(int i, int arg)> & | on_arg | ||
) | const |
Definition at line 1118 of file cpp.cc.
References kind, member_method, num_params(), and on_fd_arg_list().
Referenced by on_cpp_arg_list(), print_cpp_arg_list(), and specialize_anonymous_args().
void Method::on_cpp_arg_list | ( | const std::function< void(int i, int arg)> & | on_arg | ) | const |
Definition at line 1131 of file cpp.cc.
References empty_combiner(), and on_cpp_arg_list().
void Method::on_fd_arg_list | ( | int | start, |
int | end, | ||
const list_combiner & | combiner, | ||
const std::function< void(int i, int arg)> & | on_arg | ||
) | const |
Definition at line 1080 of file cpp.cc.
References arg, fd, generator::is_callback(), on_arg_list(), generator::prototype_n_args(), and type.
Referenced by on_cpp_arg_list(), and print_fd_arg_list().
|
virtual |
Reimplemented in NoCopyMethod.
Definition at line 1162 of file cpp.cc.
References get_param(), generator::is_callback(), generator::is_string(), generator::keeps(), pos(), and type.
Referenced by NoCopyMethod::param_needs_copy(), and cpp_generator::class_printer::print_method_header().
|
static |
Definition at line 1050 of file cpp.cc.
References on_arg_list(), and print_combiner().
Referenced by print_callback_args().
|
static |
Definition at line 933 of file cpp.cc.
Referenced by print_arg_list(), print_cpp_arg_list(), and print_fd_arg_list().
void Method::print_cpp_arg_list | ( | std::ostream & | os, |
const std::function< void(int i, int arg)> & | print_arg | ||
) | const |
Definition at line 1144 of file cpp.cc.
References on_cpp_arg_list(), and print_combiner().
Referenced by template_cpp_generator::method_impl_printer::print_callback_method_body(), template_cpp_generator::method_impl_printer::print_constructor_body(), plain_cpp_generator::impl_printer::print_method(), template_cpp_generator::method_impl_printer::print_method_body(), and cpp_generator::class_printer::print_method_header().
void Method::print_fd_arg_list | ( | std::ostream & | os, |
int | start, | ||
int | end, | ||
const std::function< void(int i, int arg)> & | print_arg | ||
) | const |
Definition at line 1105 of file cpp.cc.
References on_fd_arg_list(), and print_combiner().
Referenced by plain_cpp_generator::impl_printer::print_method().
|
virtual |
Reimplemented in EnumMethod.
Definition at line 504 of file cpp.cc.
References generator::is_callback(), generator::is_string(), generator::keeps(), name, pos(), and type.
Referenced by plain_cpp_generator::impl_printer::print_method(), and EnumMethod::print_param_use().
const std::vector<ParmVarDecl *> Method::callbacks |
Definition at line 61 of file cpp.h.
Referenced by callback_name(), print_callback_lambdas(), plain_cpp_generator::impl_printer::print_exceptional_execution_check(), plain_cpp_generator::impl_printer::print_method(), template_cpp_generator::method_impl_printer::print_method_sig(), and total_params().
const isl_class& Method::clazz |
Definition at line 57 of file cpp.h.
Referenced by cpp_generator::is_implicit_conversion(), ConversionMethod::print_call(), cpp_generator::class_printer::print_method_variants(), print_persistent_callback_exceptional_execution_check(), and cpp_type_printer::return_type().
FunctionDecl* const Method::fd |
Definition at line 58 of file cpp.h.
Referenced by c_num_params(), first_arg_is_ctx(), get_param(), cpp_generator::is_implicit_conversion(), on_fd_arg_list(), plain_return_type(), plain_cpp_generator::impl_printer::print_argument_validity_check(), template_cpp_generator::method_impl_printer::print_callback_method_body(), template_cpp_generator::method_impl_printer::print_constructor_body(), plain_cpp_generator::impl_printer::print_exceptional_execution_check(), plain_cpp_generator::impl_printer::print_method(), template_cpp_generator::method_impl_printer::print_method_body(), cpp_generator::class_printer::print_method_header(), plain_cpp_generator::impl_printer::print_method_return(), cpp_generator::class_printer::print_method_variants(), plain_cpp_generator::impl_printer::print_save_ctx(), plain_cpp_generator::impl_printer::print_set_persistent_callback(), and cpp_type_printer::return_type().
enum Kind Method::kind |
Definition at line 60 of file cpp.h.
Referenced by matching_kind(), on_cpp_arg_list(), template_cpp_generator::class_printer::print_any_method(), plain_cpp_generator::impl_printer::print_argument_validity_check(), template_cpp_generator::class_printer::print_matching_method(), plain_cpp_generator::impl_printer::print_method(), cpp_generator::class_printer::print_method_header(), template_cpp_generator::method_impl_printer::print_method_sig(), cpp_generator::class_printer::print_method_variants(), print_persistent_callback_exceptional_execution_check(), and plain_cpp_generator::impl_printer::print_save_ctx().
const std::string Method::name |
Definition at line 59 of file cpp.h.
Referenced by callback_name(), name_without_return(), ConversionMethod::print_call(), template_cpp_generator::method_impl_printer::print_callback_method_body(), template_cpp_generator::class_printer::print_constructor(), template_cpp_generator::class_printer::print_member_method(), template_cpp_generator::method_impl_printer::print_method_body(), cpp_generator::class_printer::print_method_header(), cpp_generator::class_printer::print_method_variants(), template_cpp_generator::class_printer::print_special_method(), and template_cpp_generator::class_printer::print_type_named_member_method().