Polly 20.0.0git
Classes | Public Member Functions | Static Public Member Functions | Private Member Functions | List of all members
cpp_generator Class Reference

#include <cpp.h>

Inheritance diagram for cpp_generator:
Inheritance graph
[legend]

Classes

struct  class_printer
 

Public Member Functions

 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 void generate ()=0
 
virtual ~generator ()
 

Static Public Member Functions

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)
 

Private Member Functions

void set_class_construction_types (isl_class &clazz)
 
void set_construction_types ()
 
void copy_methods (isl_class &clazz, const std::string &name, const isl_class &super, const function_set &methods)
 
void copy_super_methods (isl_class &clazz, const isl_class &super)
 
void copy_super_methods (isl_class &clazz, set< string > &done)
 
void copy_super_methods ()
 
bool is_implicit_conversion (const Method &cons)
 
bool is_subclass (QualType subclass_type, const isl_class &class_type)
 

Additional Inherited Members

- 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)
 
- Protected Attributes inherited from generator
SourceManager & SM
 
map< string, isl_classclasses
 
map< string, FunctionDecl * > functions_by_name
 
std::map< const Type *, ParmVarDecl * > conversions
 

Detailed Description

Definition at line 151 of file cpp.h.

Constructor & Destructor Documentation

◆ cpp_generator()

cpp_generator::cpp_generator ( SourceManager &  SM,
set< RecordDecl * > &  exported_types,
set< FunctionDecl * >  exported_functions,
set< FunctionDecl * >  functions 
)

Definition at line 86 of file cpp.cc.

References copy_super_methods(), and set_construction_types().

Member Function Documentation

◆ copy_methods()

void cpp_generator::copy_methods ( isl_class clazz,
const std::string &  name,
const isl_class super,
const function_set methods 
)
private

◆ copy_super_methods() [1/3]

void cpp_generator::copy_super_methods ( )
private

Definition at line 250 of file cpp.cc.

References generator::classes, and copy_super_methods().

Referenced by copy_super_methods(), and cpp_generator().

◆ copy_super_methods() [2/3]

void cpp_generator::copy_super_methods ( isl_class clazz,
const isl_class super 
)
private

Definition at line 201 of file cpp.cc.

References copy_methods(), isl_class::methods, and name.

◆ copy_super_methods() [3/3]

void cpp_generator::copy_super_methods ( isl_class clazz,
set< string > &  done 
)
private

◆ is_implicit_conversion()

bool cpp_generator::is_implicit_conversion ( const Method cons)
private

◆ is_subclass()

bool cpp_generator::is_subclass ( QualType  subclass_type,
const isl_class class_type 
)
private

Definition at line 879 of file cpp.cc.

References generator::classes, generator::find_superclasses(), isl_class::type, and type.

Referenced by is_implicit_conversion().

◆ set_class_construction_types()

void cpp_generator::set_class_construction_types ( isl_class clazz)
private

◆ set_construction_types()

void cpp_generator::set_construction_types ( )
private

Definition at line 68 of file cpp.cc.

References generator::classes, and set_class_construction_types().

Referenced by cpp_generator().

◆ type2cpp() [1/2]

string cpp_generator::type2cpp ( const isl_class clazz)
static

◆ type2cpp() [2/2]

string cpp_generator::type2cpp ( string  type_string)
static

Definition at line 773 of file cpp.cc.


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