![]() |
Rosetta
2019.12
|
Context - root, hold bindings info for whole TranslationUnit. More...
#include <context.hpp>
Public Member Functions | |
void | add (BinderOP &) |
void | generate (Config const &config) |
void | request_bindings (std::string const &type) |
string | module_variable_name (string const &namespace_) |
generate C++ expression for module variable for namespace_ More... | |
void | add_insertion_operator (clang::FunctionDecl const *f) |
clang::FunctionDecl const * | global_insertion_operator (clang::CXXRecordDecl const *) |
find gloval insertion operator for given type, return nullptr if not such operator find More... | |
std::string | trace_line (std::string const &info) |
generate unique trace line containing info to insert into the code More... | |
Private Types | |
typedef std::string | string |
Private Member Functions | |
void | bind (Config const &config) |
bind all objects residing in namespaces and it dependency More... | |
std::set< string > | create_all_nested_namespaces () |
examine binded objects and recursivly create all nested namespaces More... | |
bool | is_forward_needed (clang::CXXRecordDecl const *) |
check if forward declaration for CXXRecordDecl needed More... | |
void | add_to_binded (clang::CXXRecordDecl const *) |
add given class to 'aleady binded' set More... | |
void | sort_binders () |
sort vector of binders by dependecy so python imports could work More... | |
Private Attributes | |
std::map< std::string, clang::FunctionDecl const * > | insertion_operators |
map of function-ptr -> Decl* for global instertion operators so we can determent for which types can bind repr More... | |
std::vector< BinderOP > | binders |
array of all binderes from translation unit More... | |
std::unordered_map< string, BinderOP > | types |
types → binder More... | |
std::unordered_set< string > | ids |
set of items unique id's to keep track of whats binders being added More... | |
std::set< string > | binded |
set of items unique id's to keep track of whats binded and not More... | |
int | trace_counter = -1 |
counter to generate unique trace lines for debug More... | |
Context - root, hold bindings info for whole TranslationUnit.
|
private |
void binder::Context::add | ( | BinderOP & | b | ) |
void binder::Context::add_insertion_operator | ( | clang::FunctionDecl const * | f | ) |
References ObjexxFCL::format::F(), and binder::function_pointer_type().
|
private |
add given class to 'aleady binded' set
References binder::class_qualified_name().
|
private |
bind all objects residing in namespaces and it dependency
walk over all binders and bind one that belong to requested namespaces
References basic::options::OptionKeys::score::fiber_diffraction::b, binder::Binder::bind(), binder::Binder::bindable(), binder::Binder::binding_requested(), binder::Binder::is_binded(), binder::Binder::is_in_system_header(), and binder::Binder::request_bindings_and_skipping().
|
private |
examine binded objects and recursivly create all nested namespaces
References basic::options::OptionKeys::score::fiber_diffraction::b, binder::base_namespace(), utility::keys::AutoKey< O, S, C >::code(), binder::namespace_from_named_decl(), and basic::options::OptionKeys::in::file::s.
void binder::Context::generate | ( | Config const & | config | ) |
References binder::IncludeSet::add_include(), binder::base_namespace(), demo.D060_Folding::f, binder::file_name_prefix_for_binder(), pyrosetta.tests.distributed.test_dask::format, binder::generate_include_directives(), binder::Config::includes_code(), binder::last_namespace(), binder::main_module_header, binder::Config::maximum_file_length, binder::module_function_suffix, binder::module_header, binder::namespace_from_named_decl(), O_annotate_includes, O_single_file, O_trace, binder::Config::prefix, binder::replace(), binder::replace_(), binder::Config::root_module, basic::options::OptionKeys::in::file::s, numeric::interpolation::to_string(), and build::update_source_file().
clang::FunctionDecl const * binder::Context::global_insertion_operator | ( | clang::CXXRecordDecl const * | C | ) |
find gloval insertion operator for given type, return nullptr if not such operator find
References binder::class_qualified_name(), binder::fix_boolean_types(), binder::standard_name(), basic::options::OptionKeys::in::file::t, and numeric::interpolation::to_string().
Referenced by binder::ClassBinder::bind_repr().
|
private |
check if forward declaration for CXXRecordDecl needed
References binder::class_qualified_name(), and binder::is_python_builtin().
std::string binder::Context::module_variable_name | ( | std::string const & | namespace_ | ) |
generate C++ expression for module variable for namespace_
Referenced by binder::EnumBinder::bind(), binder::ClassBinder::bind(), binder::FunctionBinder::bind(), binder::bind_forward_declaration(), and binder::ClassBinder::bind_with().
void binder::Context::request_bindings | ( | std::string const & | type | ) |
References binder::is_python_builtin(), and DRRAFTER::type.
Referenced by binder::request_bindings().
|
private |
sort vector of binders by dependecy so python imports could work
References basic::options::OptionKeys::score::fiber_diffraction::b, C, binder::class_qualified_name(), test.T009_Exceptions::e, utility::options::OptionKeys::options::exit, basic::options::OptionKeys::score::fiber_diffraction::p, basic::options::OptionKeys::legacy_sewing::repeat, and pyrosetta.bindings.pose::rotate().
std::string binder::Context::trace_line | ( | std::string const & | info | ) |
generate unique trace line containing info
to insert into the code
References numeric::interpolation::to_string().
|
private |
set of items unique id's to keep track of whats binded and not
|
private |
array of all binderes from translation unit
|
private |
set of items unique id's to keep track of whats binders being added
|
private |
map of function-ptr -> Decl* for global instertion operators so we can determent for which types can bind repr
|
private |
counter to generate unique trace lines for debug