10 template <
typename T, n
bool isBaseObj>
class tbridger;
16 template <
typename Ret,
typename T,
template <
typename, n
bool>
class Marshaling,
typename... Args>
21 "can't marshal one of this func's parameter ntypes.");
29 const ntype& getType()
const override {
36 const baseObj& getOrigin()
const override {
45 return _marshal(
evaluated, std::index_sequence_for<Args...>());
49 template <
size_t... index>
str _marshal(
args&
a, std::index_sequence<index...>) {
50 T& me = (T*)
a.getMe() OR.err(
"object from frame does not exists.").ret(
str());
53 _closure(me,
Marshaling<Args,
tifSub<
typename typeTrait<Args>::Org,
node>::is>::toNative(
a[index])...));
58 WHEN(
a.len() !=
ps.len())
59 .err(
"length of a(%d) and typs(%d) doesn't match.",
a.len(),
ps.len()).ret(
nullptr);
63 str ased =
e.as(
ps[
n++].getOrigin()) OR.ret(
nullptr);
66 tray.setMe(
a.getMe());
71 std::function<
Ret(T&, Args...)> _closure;
78 template <
typename T,
template <
typename, n
bool>
class Marshaling,
typename... Args>
84 "can't marshal one of this func's parameter ntypes.");
90 const ntype& getType()
const override {
98 const baseObj& getOrigin()
const override {
109 return _marshal(
evaluated, std::index_sequence_for<Args...>());
113 template <
size_t... index>
str _marshal(
args&
a, std::index_sequence<index...>) {
114 T& me = (T*)
a.getMe() OR.err(
"object from frame does not exists.").ret(
str());
116 _closure(me,
Marshaling<Args,
tifSub<
typename typeTrait<Args>::Org,
node>::is>::toNative(
a[index])...);
122 WHEN(
a.len() !=
ps.len())
123 .err(
"length of a(%d) and typs(%d) doesn't match.",
a.len(),
ps.len()).ret(
nullptr);
127 str ased =
e.as(
ps[
n++].getOrigin()) OR.ret(
nullptr);
130 tray.setMe(
a.getMe());
135 std::function<void(T&, Args...)> _closure;
Root base class for the type hierarchy.
Definition adam.hpp:34
Function or object evaluation arguments.
Definition args.hpp:22
Base class for all function types.
Definition baseFunc.hpp:41
virtual params & getParams()
Base class for representing byeol objects.
Definition baseObj.hpp:73
func closure with captured object scope
Definition closure.hpp:20
Script type for byeol objects.
Definition mgdType.hpp:18
Base class for all AST nodes in the byeol language.
Definition node.hpp:195
represents native c++ type system for byeol language
Definition ntype.hpp:33
Byeol runtime environment object.
Definition obj.hpp:62
Function parameter.
Definition param.hpp:14
Function parameter list container.
Definition params.hpp:16
Bridge closure for C++ lambda/function objects.
Definition tbridgeClosure.hpp:17
C++ to byeol bridge builder.
Definition tbridger.hpp:61
Template type wrapper providing entry point for meta information.
Definition ttype.hpp:37
Weak reference smart pointer with type-safe access.
Definition tweak.hpp:16
Type trait to check if T is subclass of super.
Definition rtti.hpp:53