Rosetta  2016.28
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
binder::Context Class Reference

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< stringcreate_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< BinderOPbinders
 array of all binderes from translation unit More...
 
std::unordered_map< string,
BinderOP
types
 types → binder More...
 
std::set< stringids
 set of items unique id's to keep track of whats binders being added More...
 
std::set< stringbinded
 set of items unique id's to keep track of whats binded and not More...
 

Detailed Description

Module - represent bindings of individual Python module.

Context - root, hold bindings info for whole TranslationUnit

Member Typedef Documentation

typedef std::string binder::Context::string
private

Member Function Documentation

void binder::Context::add ( BinderOP b)
void binder::Context::add_to_binded ( clang::CXXRecordDecl const *  )
private

add given class to 'aleady binded' set

References binder::class_qualified_name().

void binder::Context::bind ( Config const &  config)
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().

std::set< string > binder::Context::create_all_nested_namespaces ( )
private
void binder::Context::generate ( Config const &  config)
bool binder::Context::is_forward_needed ( clang::CXXRecordDecl const *  )
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_)
void binder::Context::request_bindings ( std::string const &  type)
void binder::Context::sort_binders ( )
private

Member Data Documentation

std::set<string> binder::Context::binded
private

set of items unique id's to keep track of whats binded and not

std::vector<BinderOP> binder::Context::binders
private

array of all binderes from translation unit

std::set<string> binder::Context::ids
private

set of items unique id's to keep track of whats binders being added

std::unordered_map<string, BinderOP> binder::Context::types
private

types → binder


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