Rosetta
|
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) |
find binder related to given type name and bind it More... | |
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 global insertion operator for given type, otherwise return nullptr 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 their dependencies 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 'already binded' set More... | |
void | sort_binders () |
sort vector of binders by dependency 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 determine for which types we can bind repr More... | |
std::vector< BinderOP > | binders |
array of all binders 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 binders being added More... | |
std::set< string > | binded |
set of items unique id's to keep track of what is 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 | ) |
References compute_difference::b, and binder::typename_from_type_decl().
Referenced by job_manager.MoveStatsWindow::__init__(), and pyrosetta.bindings.pose.ResidueLabelAccessor::discard().
void binder::Context::add_insertion_operator | ( | clang::FunctionDecl const * | f | ) |
References ObjexxFCL::format::F(), and binder::function_pointer_type().
|
private |
add given class to 'already binded' set
add given class to 'aleady binded' set
References C, and binder::class_qualified_name().
|
private |
bind all objects residing in namespaces and their dependencies
walk over all binders and bind one that belong to requested namespaces
References compute_difference::b, kmeans_adaptive_kernel_density_bb_dependent_rotlib::flag, O_verbose, and outs.
examine binded objects and recursivly create all nested namespaces
References compute_difference::b, binder::base_namespace(), binder::namespace_from_named_decl(), and docking::s.
void binder::Context::generate | ( | Config const & | config | ) |
References binder::IncludeSet::add_include(), binder::base_namespace(), basic::options::OptionKeys::score::empty, create_a3b_hbs::f, pyrosetta.tests.distributed.test_dask::format, ObjexxFCL::get(), create_a3b_hbs::i, binder::last_namespace(), kmeans_adaptive_kernel_density_bb_dependent_rotlib::n, binder::namespace_from_named_decl(), O_annotate_includes, O_flat, O_single_file, O_trace, outs, binder::replace(), binder::replace_(), docking::s, skip(), pilot_app_settings::sources, numeric::interpolation::to_string(), and build::update_source_file().
clang::FunctionDecl const * binder::Context::global_insertion_operator | ( | clang::CXXRecordDecl const * | C | ) |
find global insertion operator for given type, otherwise return nullptr
find global insertion operator for given type, return nullptr if not such operator find
References C, binder::class_qualified_name(), binder::fix_boolean_types(), create_a3b_hbs::i, subloop_histogram::size, binder::standard_name(), predPRE::t, and numeric::interpolation::to_string().
Referenced by binder::ClassBinder::bind_repr().
|
private |
check if forward declaration for CXXRecordDecl needed
References C, 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::ClassBinder::bind(), binder::EnumBinder::bind(), binder::FunctionBinder::bind(), binder::bind_forward_declaration(), and binder::ClassBinder::bind_with().
void binder::Context::request_bindings | ( | std::string const & | type | ) |
find binder related to given type name and bind it
References binder::is_python_builtin().
Referenced by binder::request_bindings().
|
private |
sort vector of binders by dependency so python imports could work
References compute_difference::b, kmeans_adaptive_kernel_density_bb_dependent_rotlib::c, C, binder::class_qualified_name(), test.T009_Exceptions::e, utility::options::OptionKeys::options::exit, outs, kmeans_adaptive_kernel_density_bb_dependent_rotlib::p, byres_data::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 info(), and numeric::interpolation::to_string().
set of items unique id's to keep track of what is binded and not
|
private |
array of all binders from translation unit
|
private |
set of items unique id's to keep track of binders being added
|
private |
map of function-ptr -> Decl* for global instertion operators so we can determine for which types we can bind repr
|
private |
counter to generate unique trace lines for debug