Rosetta  2020.37
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Private Attributes | List of all members
binder::Binder Class Referenceabstract

Bindings Generator - represent object that can generate binding info for function, class, enum or data variable. More...

#include <context.hpp>

Inheritance diagram for binder::Binder:
Inheritance graph
[legend]

Public Types

typedef std::string string
 

Public Member Functions

virtual ~Binder ()
 
virtual string id () const =0
 Generate string id that uniquly identify C++ binding object. For functions this is function prototype and for classes forward declaration. More...
 
virtual clang::NamedDecl * named_decl () const =0
 
virtual bool bindable () const =0
 check if generator can create binding More...
 
bool binding_requested () const
 
bool skipping_requested () const
 
void request_bindings ()
 request bindings for this generator More...
 
void request_skipping ()
 request skipping for this generator More...
 
virtual void request_bindings_and_skipping (Config const &)=0
 check if user supplied config requested binding for the given declaration and if so request it More...
 
virtual void add_relevant_includes (IncludeSet &) const =0
 extract include needed for this generator and add it to includes vector More...
 
virtual void bind (Context &)=0
 generate binding code for this object and all its dependencies More...
 
bool is_binded () const
 
stringcode ()
 
string const & code () const
 
bool is_in_system_header ()
 return true if object declared in system header More...
 
virtual std::vector
< clang::CXXRecordDecl const * > 
dependencies () const
 
virtual string prefix_code () const
 return prefix portion of bindings code More...
 
 operator std::string () const
 return unique strting ID for this binder More...
 

Private Attributes

bool binding_requested_ =false
 
bool skipping_requested_ =false
 
string code_
 

Detailed Description

Bindings Generator - represent object that can generate binding info for function, class, enum or data variable.

Member Typedef Documentation

Constructor & Destructor Documentation

virtual binder::Binder::~Binder ( )
inlinevirtual

Member Function Documentation

virtual void binder::Binder::add_relevant_includes ( IncludeSet ) const
pure virtual

extract include needed for this generator and add it to includes vector

Implemented in binder::FunctionBinder, binder::ClassBinder, and binder::EnumBinder.

virtual void binder::Binder::bind ( Context )
pure virtual

generate binding code for this object and all its dependencies

Implemented in binder::FunctionBinder, binder::ClassBinder, and binder::EnumBinder.

Referenced by binder::Context::bind().

virtual bool binder::Binder::bindable ( ) const
pure virtual

check if generator can create binding

Implemented in binder::FunctionBinder, binder::ClassBinder, and binder::EnumBinder.

Referenced by binder::Context::bind().

bool binder::Binder::binding_requested ( ) const
inline

References binding_requested_.

Referenced by binder::Context::bind().

string& binder::Binder::code ( )
inline
string const& binder::Binder::code ( ) const
inline

References code_.

virtual std::vector<clang::CXXRecordDecl const *> binder::Binder::dependencies ( ) const
inlinevirtual

Reimplemented in binder::ClassBinder.

virtual string binder::Binder::id ( ) const
pure virtual

Generate string id that uniquly identify C++ binding object. For functions this is function prototype and for classes forward declaration.

Implemented in binder::FunctionBinder, binder::ClassBinder, and binder::EnumBinder.

Referenced by operator std::string().

bool binder::Binder::is_binded ( ) const
bool binder::Binder::is_in_system_header ( )

return true if object declared in system header

Referenced by binder::Context::bind().

virtual clang::NamedDecl* binder::Binder::named_decl ( ) const
pure virtual
binder::Binder::operator std::string ( ) const
inlineexplicit

return unique strting ID for this binder

References id().

virtual string binder::Binder::prefix_code ( ) const
inlinevirtual

return prefix portion of bindings code

Reimplemented in binder::ClassBinder.

void binder::Binder::request_bindings ( )
inline

request bindings for this generator

References binding_requested_.

virtual void binder::Binder::request_bindings_and_skipping ( Config const &  )
pure virtual

check if user supplied config requested binding for the given declaration and if so request it

Implemented in binder::FunctionBinder, binder::ClassBinder, and binder::EnumBinder.

Referenced by binder::Context::bind().

void binder::Binder::request_skipping ( )
inline

request skipping for this generator

References skipping_requested_.

bool binder::Binder::skipping_requested ( ) const
inline

References skipping_requested_.

Member Data Documentation

bool binder::Binder::binding_requested_ =false
private
string binder::Binder::code_
private

Referenced by code().

bool binder::Binder::skipping_requested_ =false
private

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