dynamic invoker util for advanced dynamic impl More...
Go to the source code of this file.
Classes | |
class | ZFDI_WrapperBase |
wrapper for unknown types for ZFDI_invoke More... | |
class | ZFDI_Wrapper |
see ZFDI_WrapperBase More... | |
class | ZFDI_WrapperRaw |
see ZFDI_WrapperBase More... | |
Functions | |
const zfchar * | ZFDI_toString (ZFObject *obj) |
util method to convert to string | |
zfbool | ZFDI_toNumberT (zfdouble &ret, ZFObject *obj) |
util method to convert to string | |
zfdouble | ZFDI_toNumber (ZFObject *obj) |
see ZFDI_toNumberT, return -1 if fail | |
void | ZFDI_paramInfoT (zfstring &ret, const ZFArgs &zfargs) |
util to print param info | |
zfstring | ZFDI_paramInfo (const ZFArgs &zfargs) |
see ZFDI_paramInfoT | |
zfindex | ZFDI_paramCount (const ZFArgs &zfargs) |
util method to calc param count | |
void | ZFDI_invoke (const ZFArgs &zfargs, const zfstring &name, zfbool convStr=_ZFT_t_zffalse) |
perform advanced dynamic invoke | |
void | ZFDI_alloc (const ZFArgs &zfargs, const ZFClass *cls, zfbool convStr=_ZFT_t_zffalse) |
perform advanced dynamic class alloc | |
zfbool | ZFDI_objectFromString (zfauto &ret, const zfstring &typeId, const zfchar *src, zfindex srcLen=((zfindex) -1), zfstring *errorHint=zft_zfnull) |
util to convert object from string | |
zfbool | ZFDI_implicitConvertT (zfauto &ret, const zfstring &desiredTypeId, ZFObject *value, zfstring *errorHint=zft_zfnull) |
try implicit convert if possible | |
zfauto | ZFDI_implicitConvert (const zfstring &desiredTypeId, ZFObject *value, zfstring *errorHint=zft_zfnull) |
see ZFDI_implicitConvertT | |
zfauto | ZFInvoke (const zfstring &name) |
util to ZFDI_invoke/ZFDI_alloc for static method or object allocation | |
zfauto | ZFInvoke (const zfstring &name, ZFObject *param0, ZFObject *param1=((ZFObject *const &) _ZFP_ZFMP_DEF), ZFObject *param2=((ZFObject *const &) _ZFP_ZFMP_DEF), ZFObject *param3=((ZFObject *const &) _ZFP_ZFMP_DEF), ZFObject *param4=((ZFObject *const &) _ZFP_ZFMP_DEF), ZFObject *param5=((ZFObject *const &) _ZFP_ZFMP_DEF), ZFObject *param6=((ZFObject *const &) _ZFP_ZFMP_DEF), ZFObject *param7=((ZFObject *const &) _ZFP_ZFMP_DEF)) |
see ZFInvoke | |
zfbool | ZFInvokeT (zfauto &ret, zfstring *errorHint, const zfstring &name, ZFObject *param0=((ZFObject *const &) _ZFP_ZFMP_DEF), ZFObject *param1=((ZFObject *const &) _ZFP_ZFMP_DEF), ZFObject *param2=((ZFObject *const &) _ZFP_ZFMP_DEF), ZFObject *param3=((ZFObject *const &) _ZFP_ZFMP_DEF), ZFObject *param4=((ZFObject *const &) _ZFP_ZFMP_DEF), ZFObject *param5=((ZFObject *const &) _ZFP_ZFMP_DEF), ZFObject *param6=((ZFObject *const &) _ZFP_ZFMP_DEF), ZFObject *param7=((ZFObject *const &) _ZFP_ZFMP_DEF)) |
see ZFInvoke | |
zfauto | ZFInvokeDetail (const zfstring &name, const ZFCoreArray< zfauto > ¶ms, zfbool *success=zft_zfnull, zfstring *errorHint=zft_zfnull) |
see ZFInvoke | |
ZFCoreArray< ZFOutput > & | ZFDI_errorCallbacks (void) |
callbacks when any dynamic invoker fails | |
dynamic invoker util for advanced dynamic impl
util method to convert to string
support these types:
note, for all unsigned type (zfuint for example), ensured converted as -1
for max unsigned value for compatibility
util to print param info
output format: (Class0)param0, (Class1)param1, ...
|
extern |
perform advanced dynamic invoke
note: when mentioned string
, we means any type that can be converted by ZFDI_toString
name can be:
params can be:
note: null param is also a valid param, you must fill ZFMP_DEF to indicate param end
note: only public methods are allowed to be called by this method, non-public method would result to fail, but you can still explicitly find the method by ZFMethodForName and invoke it by ZFMethod::methodInvoke
|
extern |
perform advanced dynamic class alloc
use ZFClass::classForName to find class, for the params, see ZFDI_invoke for more info
|
extern |
try implicit convert if possible
return original object if value is type of desiredTypeId, or try to construct new object from value
util to ZFDI_invoke/ZFDI_alloc for static method or object allocation
cases:
|
extern |
callbacks when any dynamic invoker fails
note: adding anything to this would cause great performance issue, use only if necessary