6#ifndef _ZFI_ZFDynamicRegisterUtil_h_
7#define _ZFI_ZFDynamicRegisterUtil_h_
410 _ZFP_ZFDynamicPrivate *d;
#define ZFLIB_ZFCore
used to export symbols
Definition ZFCoreEnvDef.h:30
#define zffinal
dummy macro shows that a method or class is designed must not to be overrided
Definition ZFCoreTypeDef_ClassType.h:63
#define zfclassLikePOD
shows the class is not a POD type, but you may use it like a POD except memset it to 0
Definition ZFCoreTypeDef_ClassType.h:41
#define ZF_IN
dummy macro that shows the param used as required input
Definition ZFCoreTypeDef_ClassType.h:180
#define ZF_IN_OPT
dummy macro that shows the param used as optional input
Definition ZFCoreTypeDef_ClassType.h:184
#define ZF_IN_OUT
dummy macro that shows the param used as required input and output
Definition ZFCoreTypeDef_ClassType.h:196
#define zfclassFwd
forward declaration of a class type
Definition ZFCoreTypeDef_ClassType.h:31
_ZFT_t_zfbool zfbool
bool type
Definition ZFCoreTypeDef_CoreType.h:103
#define zftrue
bool true type
Definition ZFCoreTypeDef_CoreType.h:107
_zft_zfidentity zfidentity
identity type, ensured at least 32 bit, ensured unsigned
Definition ZFCoreTypeDef_CoreType.h:225
#define zffalse
bool false type
Definition ZFCoreTypeDef_CoreType.h:111
#define zfnull
same as NULL, defined for future use
Definition ZFCoreTypeDef_CoreType.h:88
_ZFT_t_zfuint zfuint
same as unsigned int, see zfindex
Definition ZFCoreTypeDef_CoreType.h:169
#define ZFOUTPUT_TYPE(T_Type, outputAction)
declare your custom type conversion to string, convenient for debug
Definition ZFCoreTypeDef_OtherType.h:221
zft_zfstring< zfchar > zfstring
see zft_zfstring
Definition ZFCoreTypeDef_StringType.h:15
void ZFDynamicRemoveAll()
util method to remove all contents registered by ZFDynamic
#define ZFEnumInvalid()
invalid value for ZFEnum
Definition ZFEnum.h:18
ZFLevel
level for logic which depends on order
Definition ZFLevel.h:17
@ ZFLevelZFFrameworkPostHigh
ZFFramework post high.
Definition ZFLevel.h:31
@ ZFLevelZFFrameworkNormal
ZFFramework, for logic initialization.
Definition ZFLevel.h:21
@ ZFLevelAppNormal
app
Definition ZFLevel.h:26
@ ZFLevelZFFrameworkPostNormal
ZFFramework post normal.
Definition ZFLevel.h:30
ZFMethodType
the method type
Definition ZFMethod.h:43
@ ZFMethodTypeVirtual
virtual method
Definition ZFMethod.h:46
ZFMethodAccessType
access type for ZFMethod
Definition ZFMethod.h:17
@ ZFMethodAccessTypePublic
public
Definition ZFMethod.h:18
#define ZFMETHOD_FUNC_DECLARE_0(ZFLIB_, ReturnType, MethodName)
declare function type of ZFMethod
Definition ZFMethodFuncDeclare.h:493
#define ZF_NAMESPACE_GLOBAL_BEGIN
begin namespace ZFFramework
Definition ZFNamespace.h:97
#define ZF_NAMESPACE_GLOBAL_END
end namespace ZFFramework
Definition ZFNamespace.h:98
ZFObject related include.
#define ZFTYPEID_ACCESS_ONLY_REG(ZFLIB_, TypeName, Type,...)
see ZFTYPEID_DECLARE
Definition ZFTypeIdDeclare.h:205
#define ZFTYPEID_ACCESS_ONLY_DECLARE(ZFLIB_, TypeName, Type)
see ZFTYPEID_DECLARE
Definition ZFTypeIdDeclare.h:195
listener data used by ZFListener
Definition ZFArgs.h:20
ZFObject's class info.
Definition ZFClass.h:67
light weight array
Definition ZFCoreArray.h:331
util class to dynamic register class/method/property
Definition ZFDynamicRegisterUtil.h:56
ZFDynamic & propertyOnInit(const zfstring &propertyName, const ZFListener &callback)
util to ZFPropertyDynamicRegisterLifeCycle
ZFDynamic & event(const zfstring &name)
register a event, see also ZFEVENT ZFEVENT_GLOBAL
ZFDynamic & propertyLifeCycle(const zfstring &propertyName, ZFPropertyLifeCycle lifeCycle, const ZFListener &callback)
util to ZFPropertyDynamicRegisterLifeCycle
ZFDynamic & classBegin(const zfstring &className, const ZFClass *classParent=ZFObject::ClassData(), ZFObject *classDynamicRegisterUserData=zft_zfnull)
see ZFDynamic
ZFDynamic & staticProperty(const zfstring &propertyTypeId, const zfstring &propertyName, ZFObject *propertyInitValue=zft_zfnull, ZFMethodAccessType setterAccessType=ZFMethodAccessTypePublic, ZFMethodAccessType getterAccessType=ZFMethodAccessTypePublic)
util to register setter and getter static method to simulate static property
ZFDynamic & onInit(const ZFListener &callback)
see ZFDynamic and onEvent
Definition ZFDynamicRegisterUtil.h:158
ZFDynamic & objectHashImplByProp(void)
util to implement ZFObject::objectHashImpl by hash all properties
ZFDynamic & classCanAllocPublic(zfbool value)
see ZFClass::classCanAllocPublic
ZFDynamic & regTag(const zfstring ®Tag)
util to make the registration able to be called more than once
const ZFCoreArray< const ZFClass * > & allEnum(void) const
see ZFDynamic
ZFDynamic & enumBegin(const zfstring &enumClassName)
see ZFDynamic
static void onInitImpl(const ZFArgs &zfargs)
util for impl to implement default behavior of onInit
ZFDynamic & method(const zfstring &returnTypeId, const zfstring &methodName, const ZFMP &methodParam, const ZFListener &methodImpl, ZFMethodType methodType=ZFMethodTypeVirtual, ZFMethodAccessType methodAccessType=ZFMethodAccessTypePublic)
see ZFDynamic
ZFDynamic & singleton(const zfstring &methodName=zfstring::shared("instance"))
util to register a static method that holds singleton instance
ZFDynamic & staticPropertyWithInit(const zfstring &propertyTypeId, const zfstring &propertyName, const ZFListener &propertyInitValue, ZFMethodAccessType setterAccessType=ZFMethodAccessTypePublic, ZFMethodAccessType getterAccessType=ZFMethodAccessTypePublic)
util to register setter and getter static method to simulate static property
ZFDynamic & objectCompareImplByProp(void)
util to implement ZFObject::objectCompareImpl by ZFPropertyAllEqual
ZFDynamic & objectCompareValueImplByProp(void)
util to implement ZFObject::objectCompareValueImpl by ZFPropertyAllEqual
static void exportTag(const ZFOutput &output, zfbool exportScope=_ZFT_t_zffalse, zfbool exportInternal=_ZFT_t_zftrue)
util method to export all symbols to a tag file
ZFDynamic & staticMethod(const zfstring &returnTypeId, const zfstring &methodName, const ZFMP &methodParam, const ZFListener &methodImpl)
see ZFDynamic
ZFDynamic & classEnd(void)
see ZFDynamic
ZFDynamic & property(const ZFPropertyDynamicRegisterParam ¶m)
see ZFDynamic
ZFDynamic & propertyWithInit(const zfstring &propertyTypeId, const zfstring &propertyName, const ZFListener &propertyInitValue, ZFMethodAccessType setterAccessType=ZFMethodAccessTypePublic, ZFMethodAccessType getterAccessType=ZFMethodAccessTypePublic)
see property
void objectInfoT(zfstring &ret) const
see objectInfo
ZFDynamic & propertyOnDetach(const zfstring &propertyName, const ZFListener &callback)
util to ZFPropertyDynamicRegisterLifeCycle
static ZFCoreArray< ZFOutput > & errorCallbacks(void)
callbacks which would be called when error occurred
ZFDynamic & enumBeginFlags(const zfstring &enumClassName)
see ZFDynamic
const ZFCoreArray< const ZFClass * > & allClass(void) const
see ZFDynamic
ZFDynamic & NSEnd(void)
see ZFDynamic
ZFDynamic & objectInfoImplByStruct(void)
util to implement ZFObject::objectInfoImpl by ZFObjectShortInfo
ZFDynamic & propertyOnUpdate(const zfstring &propertyName, const ZFListener &callback)
util to ZFPropertyDynamicRegisterLifeCycle
ZFDynamic & onInitFinish(const ZFListener &callback)
see ZFDynamic and onEvent
Definition ZFDynamicRegisterUtil.h:162
ZFDynamic & property(const ZFClass *propertyClassOfRetainProperty, const zfstring &propertyName, ZFObject *propertyInitValue=zft_zfnull, ZFMethodAccessType setterAccessType=ZFMethodAccessTypePublic, ZFMethodAccessType getterAccessType=ZFMethodAccessTypePublic)
see ZFDynamic
ZFDynamic & classBegin(const ZFClass *cls)
see ZFDynamic
ZFDynamic(const zfstring ®Tag)
construct with regTag
ZFDynamic & onEvent(zfidentity eventId, const ZFListener &callback, ZFLevel level=ZFLevelAppNormal)
see ZFDynamic
const ZFCoreArray< const ZFMethod * > & allMethod(void) const
see ZFDynamic
ZFDynamic & objectInfoImplByProp(void)
util to implement ZFObject::objectInfoImpl by ZFObjectPrettyInfo
ZFDynamic & enumValue(const zfstring &enumName, zfuint enumValue=((zfuint) -1))
see ZFDynamic
void removeAll(void)
see ZFDynamic
ZFDynamic & onDealloc(const ZFListener &callback)
see ZFDynamic and onEvent
Definition ZFDynamicRegisterUtil.h:170
ZFDynamic & enumEnd(zfuint enumDefault=((zfuint) -1))
see ZFDynamic
ZFDynamic & propertyWithInit(const ZFClass *propertyClassOfRetainProperty, const zfstring &propertyName, const ZFListener &propertyInitValue, ZFMethodAccessType setterAccessType=ZFMethodAccessTypePublic, ZFMethodAccessType getterAccessType=ZFMethodAccessTypePublic)
see ZFDynamic
ZFDynamic & onInit(const ZFMP &mp, const ZFListener &impl=zft_zfnull)
util to register custom constructor
ZFDynamic & classBegin(const zfstring &className, const zfstring &parentClassName, ZFObject *classDynamicRegisterUserData=zft_zfnull)
see ZFDynamic
ZFDynamic & onDeallocPrepare(const ZFListener &callback)
see ZFDynamic and onEvent
Definition ZFDynamicRegisterUtil.h:166
ZFDynamic & staticPropertyWithInit(const ZFClass *propertyClassOfRetainProperty, const zfstring &propertyName, const ZFListener &propertyInitValue, ZFMethodAccessType setterAccessType=ZFMethodAccessTypePublic, ZFMethodAccessType getterAccessType=ZFMethodAccessTypePublic)
see staticPropertyWithInit
ZFDynamic & propertyOnAttach(const zfstring &propertyName, const ZFListener &callback)
util to ZFPropertyDynamicRegisterLifeCycle
ZFDynamic & NSBegin(const zfstring &methodNamespace)
see ZFDynamic
const ZFCoreArray< const ZFProperty * > & allProperty(void) const
see ZFDynamic
ZFDynamic & method(const ZFMethodDynamicRegisterParam ¶m)
see ZFDynamic
ZFDynamic(void)
main constructor
ZFDynamic & staticProperty(const ZFClass *propertyClassOfRetainProperty, const zfstring &propertyName, ZFObject *propertyInitValue=zft_zfnull, ZFMethodAccessType setterAccessType=ZFMethodAccessTypePublic, ZFMethodAccessType getterAccessType=ZFMethodAccessTypePublic)
see staticProperty
ZFDynamic & classImplement(const ZFClass *clsToImplement)
see ZFImplementDynamicRegister
const ZFCoreArray< zfidentity > & allEvent(void) const
see ZFDynamic
zfstring objectInfo(void) const
return object info
Definition ZFDynamicRegisterUtil.h:403
ZFDynamic & property(const zfstring &propertyTypeId, const zfstring &propertyName, ZFObject *propertyInitValue=zft_zfnull, ZFMethodAccessType setterAccessType=ZFMethodAccessTypePublic, ZFMethodAccessType getterAccessType=ZFMethodAccessTypePublic)
see ZFDynamic
const zfstring & regTag(void) const
see regTag
listener as ZFCallback, mostly used by ZFObject::observerNotify
Definition ZFObjectObserver.h:30
util for ZFDynamic::method
Definition ZFMethodDynamicRegister.h:197
param for ZFMethodDynamicRegister
Definition ZFMethodDynamicRegister.h:102
base class of all objects
Definition ZFObjectCore.h:209
static const ZFClass * ClassData(void)
get class info
Definition ZFObjectCore.h:211
static zfidentity E_ObjectAfterAlloc(void)
see ZFObject::observerNotify
static zfidentity E_ObjectBeforeAlloc(void)
see ZFObject::observerNotify
static zfidentity E_ObjectBeforeDealloc(void)
see ZFObject::observerNotify
general output callback
Definition ZFIOCallback_output.h:37
param for ZFPropertyDynamicRegister
Definition ZFPropertyDynamicRegister.h:42
#define zftext(s)
util macro for zfstring::shared
Definition zfstring.h:694