C++ to byeol bridge builder 더 자세히 ...
#include <tbridger.hpp>
Public 멤버 함수 | |
| static me func | _get ()) |
| static me | func (name, *bridgeFunc) |
| static me | _get ()) |
| static me func | _get ()) |
| static me func | _get ()) |
| static me func | _get ()) |
| static me funcNonConst | _get ()) |
| static me funcConst | _get ()) |
| static me genericFunc | _get ()) |
| static me genericFunc | _get ()) |
| static me genericFuncNonConst | _get ()) |
| static me genericFuncConst | _get ()) |
| static me closure | _get ()) |
| static me closure | _get ()) |
정적 Public 멤버 함수 | |
| static scope & | subs () |
| static me & | extend (const scope &src) |
| static me & | func (const std::string &name, const baseFunc &bridgeFunc) |
| static me & | func (const std::string *name, const baseFunc &bridgeFunc) BY_SIDE_FUNC(name |
| static me & | func (const std::string &name, const baseFunc *bridgeFunc) BY_SIDE_FUNC(bridgeFunc |
| static me & | func (const std::string *name, const baseFunc *bridgeFunc) BY_SIDE_FUNC(name &&bridgeFunc |
| template<typename... Args> | |
| static me & | ctor () |
| template<typename Ret , typename... Args> | |
| static me & | func (const std::string &name, Ret(T::*fptr)(Args...)) |
| template<typename Ret , typename... Args> | |
| static me & | func (const std::string *name, Ret(T::*fptr)(Args...)) BY_SIDE_FUNC(name |
| template<typename Ret , typename... Args> | |
| static me & | func (const std::string &name, Ret(T::*fptr)(Args...) const) |
| template<typename Ret , typename... Args> | |
| static me & | func (const std::string *name, Ret(T::*fptr)(Args...) const) BY_SIDE_FUNC(name |
| template<typename Ret , typename... Args> | |
| static me & | funcNonConst (const std::string &name, Ret(T::*fptr)(Args...)) |
| template<typename Ret , typename... Args> | |
| static me & | funcNonConst (const std::string *name, Ret(T::*fptr)(Args...)) BY_SIDE_FUNC(name |
| template<typename Ret , typename... Args> | |
| static me & | funcConst (const std::string &name, Ret(T::*fptr)(Args...) const) |
| template<typename Ret , typename... Args> | |
| static me & | funcConst (const std::string *name, Ret(T::*fptr)(Args...) const) BY_SIDE_FUNC(name |
| static me & | genericCtor () |
| template<typename... Args> | |
| static me & | genericCtor () |
| template<typename Ret , typename... Args> | |
| static me & | genericFunc (const std::string &name, Ret(T::*fptr)(Args...)) |
| template<typename Ret , typename... Args> | |
| static me & | genericFunc (const std::string *name, Ret(T::*fptr)(Args...)) BY_SIDE_FUNC(name |
| template<typename Ret , typename... Args> | |
| static me & | genericFunc (const std::string &name, Ret(T::*fptr)(Args...) const) |
| template<typename Ret , typename... Args> | |
| static me & | genericFunc (const std::string *name, Ret(T::*fptr)(Args...) const) BY_SIDE_FUNC(name |
| template<typename Ret , typename... Args> | |
| static me & | genericFuncNonConst (const std::string &name, Ret(T::*fptr)(Args...)) |
| template<typename Ret , typename... Args> | |
| static me & | genericFuncNonConst (const std::string *name, Ret(T::*fptr)(Args...)) BY_SIDE_FUNC(name |
| template<typename Ret , typename... Args> | |
| static me & | genericFuncConst (const std::string &name, Ret(T::*fptr)(Args...) const) |
| template<typename Ret , typename... Args> | |
| static me & | genericFuncConst (const std::string *name, Ret(T::*fptr)(Args...) const) BY_SIDE_FUNC(name |
| template<typename Ret , typename T1 = T, typename... Args> | |
| static me & | closure (const std::string &name, std::function< Ret(T1 &, Args...)> c) |
| template<typename Ret , typename T1 = T, typename... Args> | |
| static me & | closure (const std::string *name, std::function< Ret(T1 &, Args...)> c) BY_SIDE_FUNC(name |
| template<typename Ret , typename T1 = T> | |
| static me & | closure (const std::string &name, std::function< Ret(T1 &)> c) |
| template<typename Ret , typename T1 = T> | |
| static me & | closure (const std::string *name, std::function< Ret(T1 &)> c) BY_SIDE_FUNC(name |
| static tbridge< T > * | make (T *real) |
Public 속성 | |
| static me func | name |
| static me funcNonConst | name |
| static me funcConst | name |
| static me genericFunc | name |
| static me genericFuncNonConst | name |
| static me genericFuncConst | name |
| static me closure | name |
C++ to byeol bridge builder
As the name suggests, tbridger handles the bridge role between C++ native environment and byeol byeol runtime environment. Specifically, tbridger handles the cpp <--> byeol bridge. The goal is to easily expose natively defined functions or classes as scripted types or functions with just a few lines of C++ code.
See baseObj for a complete usage example with nStr. The key is that tbridger can very easily expose native-written functions to script code.
Brief introduction to core classes in the bridge component. See each class for detailed operation methods and algorithms.
func(), it stores externally defined functions in static variable subs().tbaseObjOrigin<tbridger<T>>, so after filling subs() through tbridger and calling tbridge::getOrigin(), the tbridge object possesses those functions through origin.tbridgerFunc<....>(). tbridgeFunc internally applies marshaling to convert C++ native types (node*, int, etc.) to appropriate script types (str, nInt). The same marshaling applies when exporting return values.new keyword.