![]() |
Rosetta
2016.28
|
Module - represent bindings of individual Python module. 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... | |
Private Types | |
typedef std::string | string |
Private Member Functions | |
void | bind (Config const &config) |
check if given CXXRecordDecl is already binded and if not add forward declaration for it. 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::vector< BinderOP > | binders |
array of all binderes from translation unit More... | |
std::unordered_map< string, BinderOP > | types |
types → binder More... | |
std::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... | |
Module - represent bindings of individual Python module.
Context - root, hold bindings info for whole TranslationUnit
|
private |
void binder::Context::add | ( | BinderOP & | b | ) |
|
private |
add given class to 'aleady binded' set
References binder::class_qualified_name().
|
private |
check if given CXXRecordDecl is already binded and if not add forward declaration for it.
walk over all binders and bind one that belong to requested namespaces
bind all objects residing in namespaces and it dependency
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().
Referenced by app.pyrosetta_toolkit.window_modules.interactive_terminal.interactive_terminal.TkConsoleView::_setBindings().
|
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::base_namespace(), demo.D060_Folding::f, binder::file_name_prefix_for_binder(), BuildPackagedBindings::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_single_file, binder::Config::prefix, binder::replace_(), binder::Config::root_module, basic::options::OptionKeys::in::file::s, utility::to_string(), and binder::update_source_file().
|
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::FunctionBinder::bind(), binder::ClassBinder::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 basic::options::OptionKeys::frags::contacts::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(), basic::options::OptionKeys::score::fiber_diffraction::p, and basic::options::OptionKeys::run::repeat.
|
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