6#ifndef _ZFI_ZFDynamicInvoker_h_
7#define _ZFI_ZFDynamicInvoker_h_
71 if(!
zfsToIntT(_zfvInt, _zfvString, _zfvString.length())) {
86 _zfvInt = (
zflong)_zfvFloat;
107 if(!
zfsToFloatT(_zfvFloat, _zfvString, _zfvString.length())) {
173 if(ref !=
zfnull && _zfvType == ref->_zfvType) {
196 if(ret.capacity() != 0) {
#define ZFLIB_ZFCore
used to export symbols
Definition ZFCoreEnvDef.h:30
#define ZFCoreCriticalShouldNotGoHere()
log that likes "[file function (line)] should not go here"
Definition ZFCoreLog_CommonLog.h:131
zfbool zfsToFloatT(T_Float &ret, const zfchar *src, zfindex srcLen=((zfindex) -1))
convert string to float
Definition ZFCoreStringConvert.h:222
zfbool zfsToIntT(T_Int &ret, const zfchar *src, zfindex srcLen=((zfindex) -1), zfindex radix=10, zfbool allowNegative=_ZFT_t_zftrue)
convert string to int, return error position if failed, or null if success
Definition ZFCoreStringConvert.h:97
zfbool zfsFromIntT(zfstring &s, T_Int n, zfindex radix=10, zfbool useUpperCase=_ZFT_t_zftrue)
convert integer number (int, long, etc) to string
Definition ZFCoreStringConvert.h:32
zfbool zfsFromFloatT(zfstring &s, T_Float n)
convert float number (int, long, etc) to string
Definition ZFCoreStringConvert.h:175
_ZFT_t_zfchar zfchar
char wrapper
Definition ZFCoreTypeDef_CharType.h:17
#define ZF_OUT_OPT
dummy macro that shows the param used as optional output
Definition ZFCoreTypeDef_ClassType.h:208
#define zfextend
dummy macro shows class inherit from another
Definition ZFCoreTypeDef_ClassType.h:53
#define zfoverride
dummy macro shows that method override parent's method
Definition ZFCoreTypeDef_ClassType.h:58
#define ZF_IN
dummy macro that shows the param used as required input
Definition ZFCoreTypeDef_ClassType.h:196
#define ZF_IN_OPT
dummy macro that shows the param used as optional input
Definition ZFCoreTypeDef_ClassType.h:200
#define ZF_OUT
dummy macro that shows the param used as required output
Definition ZFCoreTypeDef_ClassType.h:204
#define ZF_IN_OUT
dummy macro that shows the param used as required input and output
Definition ZFCoreTypeDef_ClassType.h:212
#define zfclassFwd
forward declaration of a class type
Definition ZFCoreTypeDef_ClassType.h:31
bool zffloatIsInt(T_zffloat const &v)
whether the float type holds int value
Definition ZFCoreTypeDef_CoreIntType.h:179
_ZFT_t_zfbool zfbool
bool type
Definition ZFCoreTypeDef_CoreType.h:103
_ZFT_t_zfindex zfindex
similar to size_t, used for index and size only
Definition ZFCoreTypeDef_CoreType.h:154
#define zftrue
bool true type
Definition ZFCoreTypeDef_CoreType.h:107
_zft_zfflags zfflags
used to hold flags, ensured 32 bit, ensured unsigned
Definition ZFCoreTypeDef_CoreType.h:211
_zft_zfidentity zfidentity
identity type, ensured at least 32 bit, ensured unsigned
Definition ZFCoreTypeDef_CoreType.h:225
#define zfindexMax()
(zfindex)-1, indicate a max index value, see zfindex
Definition ZFCoreTypeDef_CoreType.h:159
_zft_zfdouble zfdouble
same as double, see zfindex
Definition ZFCoreTypeDef_CoreType.h:188
_zft_zflong zflong
long, see zfindex
Definition ZFCoreTypeDef_CoreType.h:173
#define zffalse
bool false type
Definition ZFCoreTypeDef_CoreType.h:111
#define zfidentityInvalid()
an invalid id value, ensured ((zfidentity)-1)
Definition ZFCoreTypeDef_CoreType.h:229
#define zfnull
same as NULL, defined for future use
Definition ZFCoreTypeDef_CoreType.h:88
ZFCompareResult
compare result of two ZFObjects
Definition ZFCoreTypeDef_OtherType.h:28
@ ZFCompareUncomparable
Definition ZFCoreTypeDef_OtherType.h:29
@ ZFCompareEqual
Definition ZFCoreTypeDef_OtherType.h:31
zft_zfstring< zfchar > zfstring
see zft_zfstring
Definition ZFCoreTypeDef_StringType.h:15
#define zfidentityHash(hash,...)
util method to connect multiple hash value into one hash value
Definition ZFCoreUtilMacro.h:381
#define ZFBitTest(var, bit)
macro to detect whether bit is set, zftrue if any one of test bit has set
Definition ZFCoreUtilMacro.h:16
#define ZFBitSet(var, bit)
macro to set at bit
Definition ZFCoreUtilMacro.h:28
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
zfindex ZFDI_paramCount(const ZFArgs &zfargs)
util method to calc param count
Definition ZFDynamicInvoker.h:280
zfbool ZFDI_toNumberT(zfdouble &ret, ZFObject *obj)
util method to convert to number
zfstring ZFDI_paramInfo(const ZFArgs &zfargs)
see ZFDI_paramInfoT
Definition ZFDynamicInvoker.h:273
zfauto ZFInvoke(const zfstring &name)
util to ZFDI_invoke/ZFDI_alloc for static method or object allocation
zfbool ZFDI_objectFromString(zfauto &ret, const ZFClass *cls, const zfchar *src, zfindex srcLen=((zfindex) -1), zfstring *errorHint=zft_zfnull)
util to convert object from string
void ZFDI_alloc(const ZFArgs &zfargs, const ZFClass *cls, zfbool convStr=_ZFT_t_zffalse)
perform advanced dynamic class alloc
ZFCoreArray< ZFOutput > & ZFDI_errorCallbacks(void)
callbacks when any dynamic invoker fails
void ZFDI_paramInfoT(zfstring &ret, const ZFArgs &zfargs)
util to print param info
zfauto ZFInvokeDetail(const zfstring &name, const ZFCoreArray< zfauto > ¶ms, zfbool *success=zft_zfnull, zfstring *errorHint=zft_zfnull)
see ZFInvoke
zfdouble ZFDI_toNumber(ZFObject *obj)
see ZFDI_toNumberT, return -1 if fail
Definition ZFDynamicInvoker.h:252
zfstring ZFDI_toString(ZFObject *obj)
util method to convert to string
void ZFDI_invoke(const ZFArgs &zfargs, const zfstring &name, zfbool convStr=_ZFT_t_zffalse)
perform advanced dynamic invoke
zfidentity zfidentityCalcString(const zfchar *src, zfindex srcLen)
calculate identity from string
zfidentity zfidentityCalc(T_Type const &v)
calculate identity from POD object
Definition ZFIdentityUtil.h:100
#define ZFMP_DEF()
mark the object as default param
Definition ZFMethodGenericInvoker.h:30
#define ZFMETHOD_MAX_PARAM
max param supported by ZFMethod
Definition ZFMethodGenericInvoker.h:16
#define ZF_NAMESPACE_GLOBAL_BEGIN
begin namespace ZFFramework
Definition ZFNamespace.h:97
#define ZF_NAMESPACE_GLOBAL_END
end namespace ZFFramework
Definition ZFNamespace.h:98
#define zfclass
same as class, shows that this class is a ZFObject type
Definition ZFObjectClassTypeFwd.h:38
base class of all objects
#define ZFOBJECT_DECLARE(ChildClass, SuperClass,...)
necessary for every class inherit from ZFObject
Definition ZFObjectDeclare.h:122
retain count logic for ZFFramework
listener data used by ZFListener
Definition ZFArgs.h:20
ZFObject's class info.
Definition ZFClass.h:63
light weight array
Definition ZFCoreArray.h:292
ZFDI_Wrapper zfself
class ref to self
Definition ZFDynamicInvoker.h:21
ValueType valueType(void)
valueType
Definition ZFDynamicInvoker.h:39
const zfstring & valueString(void)
access string value
Definition ZFDynamicInvoker.h:47
virtual zfbool objectIsInternalPrivate(void)
whether this object is internal private object or its class is ZFClass::classIsInternalPrivate
Definition ZFDynamicInvoker.h:193
virtual zfbool objectIsInternal(void)
whether this object is internal object or its class is ZFClass::classIsInternal
Definition ZFDynamicInvoker.h:191
void value(const zflong &v)
change value
Definition ZFDynamicInvoker.h:143
zfdouble valueFloat(void)
helper method
Definition ZFDynamicInvoker.h:130
virtual void objectOnInit(const zflong &v)
init with value
Definition ZFDynamicInvoker.h:209
void value(const zfstring &v)
change value
Definition ZFDynamicInvoker.h:137
virtual zfidentity objectHashImpl(void)
see objectHash
Definition ZFDynamicInvoker.h:157
virtual ZFCompareResult objectCompareImpl(ZFObject *anotherObj)
see objectCompare
Definition ZFDynamicInvoker.h:171
virtual void objectOnInit(const zfstring &v)
init with value
Definition ZFDynamicInvoker.h:207
virtual void objectInfoImpl(zfstring &ret)
see objectInfo
Definition ZFDynamicInvoker.h:195
zfbool valueFloatT(zfdouble &ret)
helper method
Definition ZFDynamicInvoker.h:103
ValueType
value type
Definition ZFDynamicInvoker.h:25
@ TypeFloat
float type
Definition ZFDynamicInvoker.h:28
@ TypeString
string type
Definition ZFDynamicInvoker.h:26
@ TypeInt
int type
Definition ZFDynamicInvoker.h:27
virtual void objectOnInit(void)
override this to init your object
Definition ZFDynamicInvoker.h:205
virtual void objectOnInit(const zfdouble &v)
init with value
Definition ZFDynamicInvoker.h:211
void value(const zfdouble &v)
change value
Definition ZFDynamicInvoker.h:149
zflong valueInt(void)
helper method
Definition ZFDynamicInvoker.h:97
zfbool valueIntT(zflong &ret)
helper method
Definition ZFDynamicInvoker.h:67
base class of all objects
Definition ZFObjectCore.h:195
virtual void objectOnInit(void)
override this to init your object
general output callback
Definition ZFIOCallback_output.h:37
a ZFObject holder which would release content object automatically when destroyed
Definition zfautoFwd.h:34
#define zfcast(T_To, obj)
safely cast ZFObject types, return null if not desired type
Definition zfcast.h:24