tbridgeCtor.hpp
Go to the documentation of this file.
1
2#pragma once
3
5#include "core/ast/params.hpp"
8
9namespace by {
13 template <typename T, typename... Args>
15 : public tbridgeFunc<T, T, tifSub<typename tadaptiveSuper<T>::super, baseObj>::is, tmarshaling, Args...> {
18 BY(ME(tbridgeCtor, __super9), CLONE(tbridgeCtor))
19
20 public:
21 tbridgeCtor(): super(nullptr) {}
22
23 public:
24 str _runNative(args& args) override { return _marshal(args, std::index_sequence_for<Args...>()); }
25
26 template <size_t... index> str _marshal(args& a, std::index_sequence<index...>) {
28 new T(tmarshaling<Args, tifSub<Args, node>::is>::toNative(a[index])...));
29 }
30 };
31}
Function call arguments container.
Definition: args.hpp:13
Base class for all objects in byeol language.
Definition: baseObj.hpp:24
Bridge constructor for C++ objects.
Definition: tbridgeCtor.hpp:15
Definition: tbridgeFunc.hpp:72
Type trait to check if T is subclass of super.
Definition: rtti.hpp:48
Template marshaling interface for C++ bridge.
Definition: tmarshaling.hpp:18