#define HX_DEFINE_DYNAMIC_FUNC0(class,func,ret) \
Dynamic __##class##func(hx::Object *inObj) \
{ \
ret reinterpret_cast<class *>(inObj)->func(); return Dynamic(); \
}; \
Dynamic class::func##_dyn() \
{\
return hx::CreateMemberFunction0(this,__##class##func); \
}
The above CreateMemberFunction0 is a struct that holds information about the function. The function __##class##func is presumably at some point executed and its result is passed to relevant code. However, I am confused by this because it appears that the execution of the function returns the execution of a function called Dynamic? Dynamic is also a class (for those unfamiliar) with hxcpp/haxe.
- Is Dynamic() an execution of a function or is it a no-argument construction on the stack of an object?
- What is the ret keyword?
- If 1 is correct, how is the result of execution of the function passed?