Polly 20.0.0git
Classes | Public Member Functions | Public Attributes | Private Member Functions | List of all members
template_cpp_generator Class Reference

#include <template_cpp.h>

Inheritance diagram for template_cpp_generator:
Inheritance graph
[legend]

Classes

struct  class_decl_printer
 
struct  class_impl_printer
 
struct  class_printer
 
struct  method_decl_printer
 
struct  method_impl_printer
 

Public Member Functions

 template_cpp_generator (clang::SourceManager &SM, std::set< clang::RecordDecl * > &exported_types, std::set< clang::FunctionDecl * > exported_functions, std::set< clang::FunctionDecl * > functions)
 
virtual void generate () override
 
void foreach_template_class (const std::function< void(const template_class &)> &fn) const
 
void print_forward_declarations (std::ostream &os)
 
void print_friends (std::ostream &os)
 
- 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 void generate ()=0
 
virtual ~generator ()
 

Public Attributes

std::map< std::string, template_classtemplate_classes
 

Private Member Functions

void add_template_class (const isl_class &clazz, const std::string &name, const std::vector< Kind > &class_tuples)
 

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)
 
- 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 94 of file template_cpp.h.

Constructor & Destructor Documentation

◆ template_cpp_generator()

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

Member Function Documentation

◆ add_template_class()

void template_cpp_generator::add_template_class ( const isl_class clazz,
const std::string &  name,
const std::vector< Kind > &  class_tuples 
)
private

Definition at line 1078 of file template_cpp.cc.

References cpp_type_printer::isl_namespace(), name, and template_classes.

Referenced by template_cpp_generator().

◆ foreach_template_class()

void template_cpp_generator::foreach_template_class ( const std::function< void(const template_class &)> &  fn) const

Definition at line 1119 of file template_cpp.cc.

References fn, and template_classes.

Referenced by print_forward_declarations(), and print_friends().

◆ generate()

void template_cpp_generator::generate ( )
overridevirtual

◆ print_forward_declarations()

void template_cpp_generator::print_forward_declarations ( std::ostream &  os)

◆ print_friends()

void template_cpp_generator::print_friends ( std::ostream &  os)

Definition at line 1155 of file template_cpp.cc.

References template_class::class_name, and foreach_template_class().

Member Data Documentation

◆ template_classes

std::map<std::string, template_class> template_cpp_generator::template_classes

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