Polly 22.0.0git
plain_cpp_generator Class Reference

#include <plain_cpp.h>

Inheritance diagram for plain_cpp_generator:
[legend]

Classes

struct  decl_printer
struct  impl_printer
struct  plain_printer

Public Member Functions

 plain_cpp_generator (SourceManager &SM, set< RecordDecl * > &exported_types, set< FunctionDecl * > exported_functions, set< FunctionDecl * > functions, bool checked=false)
virtual void generate ()
Public Member Functions inherited from cpp_generator
 cpp_generator (SourceManager &SM, set< RecordDecl * > &exported_types, set< FunctionDecl * > exported_functions, set< FunctionDecl * > functions)
Public Member Functions inherited from generator
 generator (SourceManager &SM, set< RecordDecl * > &exported_types, set< FunctionDecl * > exported_functions, set< FunctionDecl * > functions)
virtual ~generator ()

Protected Attributes

bool checked
Protected Attributes inherited from generator
SourceManager & SM
map< string, isl_classclasses
map< string, FunctionDecl * > functions_by_name
std::map< const Type *, ParmVarDecl * > conversions

Private Member Functions

void print_forward_declarations (ostream &os)
void print_declarations (ostream &os)
void print_class (ostream &os, const isl_class &clazz)
void print_class_forward_decl (ostream &os, const isl_class &clazz)
void print_implementations (ostream &os)
void print_class_impl (ostream &os, const isl_class &clazz)
void print_check_no_persistent_callback (ostream &os, const isl_class &clazz, FunctionDecl *fd)
void print_invalid (ostream &os, int indent, const char *msg, const char *checked_code)
void print_method_param_use (ostream &os, ParmVarDecl *param, bool load_from_this_ptr)
std::unique_ptr< cpp_type_printertype_printer ()
std::string get_return_type (const Method &method)
string generate_callback_args (QualType type, bool cpp)
string generate_callback_type (QualType type)
string isl_bool2cpp ()
string isl_namespace ()
string param2cpp (QualType type)

Additional Inherited Members

Static Public Member Functions inherited from cpp_generator
static string type2cpp (const isl_class &clazz)
static string type2cpp (string type_string)
Static Public Member Functions inherited from generator
static std::string drop_suffix (const std::string &s, const std::string &suffix)
static void die (const char *msg) __attribute__((noreturn))
static void die (string msg) __attribute__((noreturn))
static vector< string > find_superclasses (Decl *decl)
static bool is_subclass (FunctionDecl *decl)
static bool is_overload (Decl *decl)
static bool is_constructor (Decl *decl)
static bool takes (Decl *decl)
static bool keeps (Decl *decl)
static bool gives (Decl *decl)
static bool is_isl_ctx (QualType type)
static bool first_arg_is_isl_ctx (FunctionDecl *fd)
static bool is_isl_type (QualType type)
static bool is_isl_neg_error (QualType type)
static bool is_isl_bool (QualType type)
static bool is_isl_stat (QualType type)
static bool is_isl_size (QualType type)
static bool is_long (QualType type)
static bool is_callback (QualType type)
static bool is_callback_arg (FunctionDecl *fd, int i)
static bool is_string (QualType type)
static bool is_static (const isl_class &clazz, FunctionDecl *method)
static bool is_mutator (const isl_class &clazz, FunctionDecl *fd)
static string extract_type (QualType type)
static const FunctionProtoType * extract_prototype (QualType type)
static int prototype_n_args (QualType type)
static ParmVarDecl * persistent_callback_arg (FunctionDecl *fd)
Protected Member Functions inherited from generator
void add_subclass (RecordDecl *decl, const string &name, const string &sub_name)
void add_class (RecordDecl *decl)
void add_type_subclasses (FunctionDecl *method)
isl_classmethod2class (FunctionDecl *fd)
bool callback_takes_argument (ParmVarDecl *param, int pos)
FunctionDecl * find_by_name (const string &name, bool required)

Detailed Description

Definition at line 29 of file plain_cpp.h.

Constructor & Destructor Documentation

◆ plain_cpp_generator()

plain_cpp_generator::plain_cpp_generator ( SourceManager & SM,
set< RecordDecl * > & exported_types,
set< FunctionDecl * > exported_functions,
set< FunctionDecl * > functions,
bool checked = false )

Member Function Documentation

◆ generate()

void plain_cpp_generator::generate ( )
virtual

◆ generate_callback_args()

string plain_cpp_generator::generate_callback_args ( QualType type,
bool cpp )
private

Definition at line 1648 of file plain_cpp.cc.

References type, and type_printer().

◆ generate_callback_type()

string plain_cpp_generator::generate_callback_type ( QualType type)
private

Definition at line 1659 of file plain_cpp.cc.

References type, and type_printer().

◆ get_return_type()

std::string plain_cpp_generator::get_return_type ( const Method & method)
private

Definition at line 1524 of file plain_cpp.cc.

References type_printer().

◆ isl_bool2cpp()

string plain_cpp_generator::isl_bool2cpp ( )
private

Definition at line 2048 of file plain_cpp.cc.

References type_printer().

◆ isl_namespace()

string plain_cpp_generator::isl_namespace ( )
private

Definition at line 2084 of file plain_cpp.cc.

References type_printer().

◆ param2cpp()

string plain_cpp_generator::param2cpp ( QualType type)
private

Definition at line 2095 of file plain_cpp.cc.

References type, and type_printer().

◆ print_check_no_persistent_callback()

void plain_cpp_generator::print_check_no_persistent_callback ( ostream & os,
const isl_class & clazz,
FunctionDecl * fd )
private

◆ print_class()

◆ print_class_forward_decl()

void plain_cpp_generator::print_class_forward_decl ( ostream & os,
const isl_class & clazz )
private

Definition at line 271 of file plain_cpp.cc.

References osprintf(), and cpp_generator::type2cpp().

Referenced by print_forward_declarations().

◆ print_class_impl()

◆ print_declarations()

void plain_cpp_generator::print_declarations ( ostream & os)
private

Definition at line 164 of file plain_cpp.cc.

References generator::classes, map, osprintf(), and print_class().

Referenced by generate().

◆ print_forward_declarations()

void plain_cpp_generator::print_forward_declarations ( ostream & os)
private

Definition at line 152 of file plain_cpp.cc.

References generator::classes, map, osprintf(), and print_class_forward_decl().

Referenced by generate().

◆ print_implementations()

void plain_cpp_generator::print_implementations ( ostream & os)
private

Definition at line 181 of file plain_cpp.cc.

References generator::classes, map, osprintf(), and print_class_impl().

Referenced by generate().

◆ print_invalid()

void plain_cpp_generator::print_invalid ( ostream & os,
int indent,
const char * msg,
const char * checked_code )
private

Definition at line 702 of file plain_cpp.cc.

References checked, osprintf(), and print_throw_invalid().

Referenced by print_check_no_persistent_callback().

◆ print_method_param_use()

void plain_cpp_generator::print_method_param_use ( ostream & os,
ParmVarDecl * param,
bool load_from_this_ptr )
private

References type.

◆ type_printer()

std::unique_ptr< cpp_type_printer > plain_cpp_generator::type_printer ( )
private

Member Data Documentation

◆ checked

bool plain_cpp_generator::checked
protected

Definition at line 34 of file plain_cpp.h.

Referenced by generate(), plain_cpp_generator(), print_invalid(), and type_printer().


The documentation for this class was generated from the following files: