10 template <
typename T>
class tbridge;
11 template <
typename T,
typename defaultElemType>
class tarr;
17 template <typename T, nbool isNode = tifSub<typename typeTrait<T>::Org,
node>::is>
21 template <
typename E>
static str toMgd(E& it) {
throw marshalErr(); }
25 static const mgd& onAddParam() {
return *
new mgd(); }
27 static const mgd* onGetRet() {
throw marshalErr(); }
29 static no canMarshal();
35 template <
typename E>
static str toMgd(E& it) {
return it; }
39 static const mgd& onAddParam() {
return *
new mgd(
new T()); }
41 static const mgd* onGetRet() {
return new mgd(
new T()); }
43 static yes canMarshal();
49 template <
typename E>
static str toMgd(E& it) {
return it; }
53 static const mgd& onAddParam() {
return *
new mgd(
new T()); }
55 static const mgd* onGetRet() {
return new mgd(
new T()); }
57 static yes canMarshal();
63 template <
typename E>
static str toMgd(E& it) {
return it; }
65 static node& toNative(
node& it) {
return it; }
67 static const mgd& onAddParam() {
return *
new mockNode(); }
69 static const mgd* onGetRet() {
return new mockNode(); }
71 static yes canMarshal();
77 template <
typename E>
static str toMgd(E* it) {
return it; }
79 static node* toNative(
node& it) {
return ⁢ }
81 static const mgd& onAddParam() {
return *
new mockNode(); }
83 static const mgd* onGetRet() {
return new mockNode(); }
85 static yes canMarshal();
91 template <
typename E>
static str toMgd(E& it) {
return it; }
93 static T& toNative(
node& it) {
return *it.cast<T>(); }
95 static const mgd& onAddParam() {
return *
new mgd(); }
97 static const mgd* onGetRet() {
return new mgd(); }
99 static yes canMarshal();
105 template <
typename E>
static str toMgd(E* it) {
return it; }
107 static T* toNative(
node& it) {
return it.cast<T>(); }
109 static const mgd& onAddParam() {
return *
new mgd(); }
111 static const mgd* onGetRet() {
return new mgd(); }
113 static yes canMarshal();
119 template <
typename E>
static str toMgd(
const E& it) {
return str((E*) it.clone()); }
121 static T& toNative(
node& it) {
return *it.cast<T>(); }
123 static const mgd& onAddParam() {
return *
new mgd(); }
125 static const mgd* onGetRet() {
return new mgd(); }
127 static yes canMarshal();
134 typedef tmarshalType mgd;
135 typedef tnativeType native;
137 static native toNative(
node& it) {
return ((mgd&) it).get(); }
139 static str toMgd(native it) {
return str(
new mgd(it)); }
141 static const mgd& onAddParam() {
return *
new mgd(); }
143 static const mgd* onGetRet() {
return new mgd(); }
145 static yes canMarshal();
152 static native toNative(
node& it) {
153 const std::string& cast = ((
mgd&) it).get();
154 return cast.length() > 0 ? cast[0] :
'\0';
157 static str toMgd(native it) {
return str(
new mgd(it)); }
159 static const mgd& onAddParam() {
return *
new mgd(); }
161 static const mgd* onGetRet() {
return new mgd(); }
163 static yes canMarshal();
168 typedef const char* native;
170 static native toNative(
node& it) {
return ((
mgd&) it).get().c_str(); }
172 static str toMgd(native it) {
return str(
new mgd(it)); }
174 static const mgd& onAddParam() {
return *
new mgd(); }
176 static const mgd* onGetRet() {
return new mgd(); }
178 static yes canMarshal();
190 static const mgd& onAddParam() {
return *
new mgd(); }
192 static const mgd* onGetRet() {
return new mgd(); }
194 static yes canMarshal();
228 template <
typename E>
static str toMgd(
const E& it) {
return new mgd(
new E(it)); }
230 static T& toNative(
node& it) {
return *it.cast<T>(); }
232 static const mgd& onAddParam() {
return *
new mgd(); }
234 static const mgd* onGetRet() {
return new mgd(); }
236 static yes canMarshal();
242 template <
typename E>
static str toMgd(E& it) {
return new mgd(&it); }
244 static T& toNative(
node& it) {
return it.cast<
tbridge<T>>()->get(); }
246 static const mgd& onAddParam() {
return *
new mgd(); }
248 static const mgd* onGetRet() {
return new mgd(); }
250 static yes canMarshal();
256 template <
typename E>
static str toMgd(E* it) {
return new mgd(it); }
258 static T* toNative(
node& it) {
return &it.cast<
tbridge<T>>()->get(); }
260 static const mgd& onAddParam() {
return *
new mgd(); }
262 static const mgd* onGetRet() {
return new mgd(); }
264 static yes canMarshal();
272 template <
typename E2>
static str toMgd(E2* it);
274 static const mgd& onAddParam();
275 static const mgd* onGetRet();
276 static yes canMarshal();
Managed array container for byeol language.
Definition: arr.hpp:14
String primitive type in byeol language.
Definition: nStr.hpp:13
Void primitive type in byeol language.
Definition: nVoid.hpp:12
Base class for all AST nodes in byeol language.
Definition: node.hpp:30
Bridge template for C++ objects.
Definition: tbridge.hpp:17
Mock object template for testing and verification.
Definition: tmock.hpp:13
Weak reference smart pointer with type-safe access.
Definition: tweak.hpp:15
Definition: tmarshaling.hpp:9
Template marshaling interface for C++ bridge.
Definition: tmarshaling.hpp:18
Normal marshaling for primitive types.
Definition: tmarshaling.hpp:133