Rosetta  3.7
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Namespaces | Functions | Variables
class.cpp File Reference

Binding generation for C++ struct and class objects. More...

#include <class.hpp>
#include <function.hpp>
#include <enum.hpp>
#include <type.hpp>
#include <util.hpp>
#include <fmt/format.h>
#include <clang/AST/DeclTemplate.h>

Namespaces

 binder
 

Functions

string binder::template_specialization (clang::CXXRecordDecl const *C)
 
string binder::class_name (CXXRecordDecl const *C)
 
string binder::python_class_name (CXXRecordDecl const *C)
 
string binder::class_qualified_name (CXXRecordDecl const *C)
 
vector< QualType > binder::get_type_dependencies (CXXRecordDecl const *C)
 
bool binder::is_inherited_from_enable_shared_from_this (CXXRecordDecl const *C)
 
bool binder::is_field_assignable (FieldDecl const *f)
 
bool binder::is_bindable (FieldDecl *f)
 check if generator can create binding More...
 
string binder::bind_data_member (FieldDecl const *d, string const &class_qualified_name)
 
bool binder::is_bindable (clang::CXXRecordDecl const *C)
 check if generator can create binding More...
 
bool binder::is_binding_requested (clang::CXXRecordDecl const *C, Config const &config)
 check if user requested binding for the given declaration More...
 
bool binder::is_skipping_requested (clang::CXXRecordDecl const *C, Config const &config)
 check if user requested skipping for the given declaration More...
 
void binder::add_relevant_includes (clang::CXXRecordDecl const *C, IncludeSet &includes, int level)
 
bool binder::base_default_default_constructor_available (CXXRecordDecl const *C)
 DEPRECATED Check if all bases have public default constructors. More...
 
string binder::binding_public_data_members (CXXRecordDecl const *C)
 
bool binder::is_const_overload (CXXMethodDecl *mc)
 
string binder::callback_structure_name (CXXRecordDecl const *C)
 
bool binder::is_callback_structure_needed (CXXRecordDecl const *C)
 
bool binder::is_callback_structure_constructible (CXXRecordDecl const *C)
 
string binder::bind_member_functions_for_call_back (CXXRecordDecl const *C, set< string > &binded, int &ret_id, std::vector< clang::FunctionDecl const * > &prefix_includes)
 
string binder::binding_public_member_functions (CXXRecordDecl const *C, bool callback_structure, bool callback_structure_constructible, Context &context)
 
string binder::binding_template_bases (CXXRecordDecl const *C, bool callback_structure, bool callback_structure_constructible, Context &context)
 
string binder::bind_forward_declaration (CXXRecordDecl const *C, Context &context)
 Create forward-binding for given class which consist of only class type without any member, function or constructors. More...
 
string binder::bind_constructor (CXXConstructorDecl const *T, pair< string, string > const &constructor_types, uint args_to_bind, bool request_bindings_f, Context &context)
 
string binder::bind_constructor (CXXConstructorDecl const *T, pair< string, string > const &constructor_types, Context &context)
 

Variables

const char * binder::call_back_function_body_template
 
char const * binder::constructor_template = "\tcl.def(\"__init__\", []({2} *self_{0}) {{ new (self_) {2}({1}); }}, \"doc\");"
 
char const * binder::constructor_if_template = "\tcl.def(\"__init__\", [cl_type](pybind11::handle self_{0}) {{ if (self_.get_type() == cl_type) new (self_.cast<{2} *>()) {2}({1}); else new (self_.cast<{3} *>()) {3}({1}); }}, \"doc\");"
 

Detailed Description

Binding generation for C++ struct and class objects.

Author
Sergey Lyskov