Rosetta
|
Bindings Generator - represent object that can generate binding info for function, class, enum or data variable. More...
#include <binder.hpp>
Public Types | |
typedef std::string | string |
Public Member Functions | |
virtual | ~Binder () |
virtual string | id () const =0 |
Generate string id that uniquely identify C++ binding object. For functions this is function prototype and for classes forward declaration. More... | |
virtual clang::NamedDecl const * | 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 |
return true if code was already generated for this object More... | |
string & | code () |
return binding code More... | |
string const & | code () const |
bool | is_in_system_header () |
return true if object is declared in system header More... | |
virtual std::vector< clang::CXXRecordDecl const * > | dependencies () const |
return vector of declarations that need to be binded before this one could More... | |
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_ |
Bindings Generator - represent object that can generate binding info for function, class, enum or data variable.
typedef std::string binder::Binder::string |
|
inlinevirtual |
|
pure virtual |
extract include needed for this generator and add it to includes vector
Implemented in binder::FunctionBinder, binder::EnumBinder, and binder::ClassBinder.
|
pure virtual |
generate binding code for this object and all its dependencies
Implemented in binder::FunctionBinder, binder::EnumBinder, and binder::ClassBinder.
|
pure virtual |
check if generator can create binding
Implemented in binder::FunctionBinder, binder::EnumBinder, and binder::ClassBinder.
|
inline |
References binding_requested_.
|
inline |
|
inlinevirtual |
return vector of declarations that need to be binded before this one could
Reimplemented in binder::ClassBinder.
|
pure virtual |
Generate string id that uniquely identify C++ binding object. For functions this is function prototype and for classes forward declaration.
Implemented in binder::FunctionBinder, binder::EnumBinder, and binder::ClassBinder.
Referenced by schema.Job::__repr__(), and operator std::string().
bool binder::Binder::is_binded | ( | ) | const |
return true if code was already generated for this object
References code(), binder::is_python_builtin(), and named_decl().
bool binder::Binder::is_in_system_header | ( | ) |
return true if object is declared in system header
return true if object declared in system header
References named_decl(), and sm.
|
pure virtual |
Implemented in binder::FunctionBinder, binder::EnumBinder, and binder::ClassBinder.
Referenced by is_binded(), and is_in_system_header().
|
inlineexplicit |
return unique strting ID for this binder
References id().
|
inlinevirtual |
return prefix portion of bindings code
Reimplemented in binder::ClassBinder.
|
inline |
request bindings for this generator
References binding_requested_.
|
pure virtual |
check if user supplied config requested binding for the given declaration and if so request it
Implemented in binder::FunctionBinder, binder::EnumBinder, and binder::ClassBinder.
|
inline |
request skipping for this generator
References skipping_requested_.
|
inline |
References skipping_requested_.
|
private |
Referenced by binding_requested(), and request_bindings().
|
private |
Referenced by request_skipping(), and skipping_requested().