| 1429 | |
| 1430 | template<class ELEM_> |
| 1431 | hx::Val Array_obj<ELEM_>::__Field(const String& inString, hx::PropertyAccess inCallProp) |
| 1432 | { |
| 1433 | #define ARRAY_RUN_FUNC(ret,func,dynamic_arg_list,arg_list) \ |
| 1434 | ::Dynamic __run(dynamic_arg_list) \ |
| 1435 | { \ |
| 1436 | ret mThis->__##func(arg_list); return ::Dynamic(); \ |
| 1437 | } |
| 1438 | |
| 1439 | #define DEFINE_ARRAY_FUNC(ret,func,array_list,run_func,ARG_C) \ |
| 1440 | struct Reflective_##func : public ::hx::Object \ |
| 1441 | { \ |
| 1442 | HX_IS_INSTANCE_OF enum { _hx_ClassId = ::hx::clsIdClosure }; \ |
| 1443 | bool __IsFunction() const { return true; } \ |
| 1444 | ::Array_obj<ELEM_> *mThis; \ |
| 1445 | Reflective_##func(::Array_obj<ELEM_> *inThis) : mThis(inThis) { } \ |
| 1446 | ::String toString() override { return HX_CSTRING(#func) ; } \ |
| 1447 | ::String __ToString() const override { return HX_CSTRING(#func) ; } \ |
| 1448 | int __GetType() const override { return vtFunction; } \ |
| 1449 | void *__GetHandle() const override { return mThis; } \ |
| 1450 | int __ArgCount() const override { return ARG_C; } \ |
| 1451 | void __Mark(::hx::MarkContext *__inCtx) override { HX_MARK_MEMBER(mThis); } \ |
| 1452 | ARRAY_VISIT_FUNC \ |
| 1453 | ::Dynamic __Run(const ::Array<::Dynamic> &inArgs) override \ |
| 1454 | { \ |
| 1455 | ret mThis->__##func(array_list); return ::Dynamic(); \ |
| 1456 | } \ |
| 1457 | run_func \ |
| 1458 | int __Compare(const ::hx::Object *inRHS) const override \ |
| 1459 | { \ |
| 1460 | if (!dynamic_cast<const Reflective_##func *>(inRHS)) return -1; \ |
| 1461 | return (mThis==inRHS->__GetHandle() ? 0 : -1); \ |
| 1462 | } \ |
| 1463 | }; |
| 1464 | |
| 1465 | |
| 1466 | #define DEFINE_ARRAY_FUNC0(ret,func) DEFINE_ARRAY_FUNC(ret,func,HX_ARR_LIST0,ARRAY_RUN_FUNC(ret,func,HX_DYNAMIC_ARG_LIST0,HX_ARG_LIST0),0) |
| 1467 | #define DEFINE_ARRAY_FUNC1(ret,func) DEFINE_ARRAY_FUNC(ret,func,HX_ARR_LIST1,ARRAY_RUN_FUNC(ret,func,HX_DYNAMIC_ARG_LIST1,HX_ARG_LIST1),1) |
| 1468 | #define DEFINE_ARRAY_FUNC2(ret,func) DEFINE_ARRAY_FUNC(ret,func,HX_ARR_LIST2,ARRAY_RUN_FUNC(ret,func,HX_DYNAMIC_ARG_LIST2,HX_ARG_LIST2),2) |
| 1469 | #define DEFINE_ARRAY_FUNC3(ret,func) DEFINE_ARRAY_FUNC(ret,func,HX_ARR_LIST3,ARRAY_RUN_FUNC(ret,func,HX_DYNAMIC_ARG_LIST3,HX_ARG_LIST3),3) |
| 1470 | #define DEFINE_ARRAY_FUNC4(ret,func) DEFINE_ARRAY_FUNC(ret,func,HX_ARR_LIST4,ARRAY_RUN_FUNC(ret,func,HX_DYNAMIC_ARG_LIST4,HX_ARG_LIST4),4) |
| 1471 | |
| 1472 | DEFINE_ARRAY_FUNC1(, __SetSize); |
| 1473 | DEFINE_ARRAY_FUNC1(, __SetSizeExact); |
| 1474 | DEFINE_ARRAY_FUNC2(, insert); |
| 1475 | DEFINE_ARRAY_FUNC0(, reverse); |
| 1476 | DEFINE_ARRAY_FUNC1(, sort); |
| 1477 | DEFINE_ARRAY_FUNC1(, unshift); |
| 1478 | DEFINE_ARRAY_FUNC4(, blit); |
| 1479 | DEFINE_ARRAY_FUNC2(, zero); |
| 1480 | DEFINE_ARRAY_FUNC1(, resize); |
| 1481 | DEFINE_ARRAY_FUNC1(return, concat); |
| 1482 | DEFINE_ARRAY_FUNC0(return, iterator); |
| 1483 | DEFINE_ARRAY_FUNC0(return, keyValueIterator); |
| 1484 | DEFINE_ARRAY_FUNC1(return, join); |
| 1485 | DEFINE_ARRAY_FUNC0(return, pop); |
| 1486 | DEFINE_ARRAY_FUNC0(return, copy); |
| 1487 | DEFINE_ARRAY_FUNC1(return, push); |
| 1488 | DEFINE_ARRAY_FUNC1(return, contains); |
nothing calls this directly
no test coverage detected