ZFFramework
 
Loading...
Searching...
No Matches
ZFPropertyDynamicRegister.h
Go to the documentation of this file.
1
5
6#ifndef _ZFI_ZFPropertyDynamicRegister_h_
7#define _ZFI_ZFPropertyDynamicRegister_h_
8
10#include "ZFProperty.h"
12
13// ============================================================
32 , ZF_OUT_OPT zfstring *errorHint = zfnull
33 );
38
39// ============================================================
40zfclassFwd _ZFP_ZFPropertyDynamicRegisterParamPrivate;
43public:
48
52 const ZFClass *ownerClass(void) const;
53
57 const zfstring &propertyTypeId(void) const;
58
62 const zfstring &propertyTypeName(void) const;
63
67 const zfstring &propertyName(void) const;
68
73
78
83
88
89 // ============================================================
90 // for custom impl
93 ZF_IN const ZFMethod *propertySetterMethod
94 , ZF_IN const ZFMethod *propertyGetterMethod
95 , ZF_IN ZFPropertyCallbackIsValueAccessed callbackIsValueAccessed
96 , ZF_IN ZFPropertyCallbackIsInitValue callbackIsInitValue
97 , ZF_IN ZFPropertyCallbackValueReset callbackValueReset
98 );
99
110
111public:
116
117public:
122 zfstring ret;
123 this->objectInfoT(ret);
124 return ret;
125 }
126
127 // ============================================================
128public:
134 zfbool operator == (ZF_IN ZFPropertyDynamicRegisterParam const &ref) const;
135 zfbool operator != (ZF_IN ZFPropertyDynamicRegisterParam const &ref) const {return !this->operator == (ref);}
137
138private:
139 _ZFP_ZFPropertyDynamicRegisterParamPrivate *d;
140};
141
143#endif // #ifndef _ZFI_ZFPropertyDynamicRegister_h_
144
#define ZFLIB_ZFCore
used to export symbols
Definition ZFCoreEnvDef.h:30
#define ZF_OUT_OPT
dummy macro that shows the param used as optional output
Definition ZFCoreTypeDef_ClassType.h:192
#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_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 zfnull
same as NULL, defined for future use
Definition ZFCoreTypeDef_CoreType.h:88
zft_zfstring< zfchar > zfstring
see zft_zfstring
Definition ZFCoreTypeDef_StringType.h:15
ZFMethodAccessType
access type for ZFMethod
Definition ZFMethod.h:17
user registered ZFMethod
#define ZF_NAMESPACE_GLOBAL_BEGIN
begin namespace ZFFramework
Definition ZFNamespace.h:97
#define ZF_NAMESPACE_GLOBAL_END
end namespace ZFFramework
Definition ZFNamespace.h:98
property for ZFObject type
void ZFPropertyDynamicUnregister(const ZFProperty *property)
see ZFPropertyDynamicRegister
const ZFProperty * ZFPropertyDynamicRegister(const ZFPropertyDynamicRegisterParam &param, zfstring *errorHint=zft_zfnull)
dynamic register a property, return null if fail
zfauto(* ZFPropertyCallbackDynamicRegisterInitValueGetter)(const ZFProperty *property)
callback to setup init value for ZFPropertyDynamicRegister
Definition ZFPropertyFwd.h:86
zfbool(* ZFPropertyCallbackIsValueAccessed)(const ZFProperty *property, zfany const &ownerObj)
used to check whether the property has been accessed
Definition ZFPropertyFwd.h:27
void(* ZFPropertyCallbackValueReset)(const ZFProperty *property, zfany const &ownerObj)
used to reset the property to its init state
Definition ZFPropertyFwd.h:63
zfbool(* ZFPropertyCallbackIsInitValue)(const ZFProperty *property, zfany const &ownerObj, zfauto *outInitValue)
used to check whether the property is in init value state
Definition ZFPropertyFwd.h:48
ZFObject's class info.
Definition ZFClass.h:67
reflectable method for ZFObject
Definition ZFMethod.h:252
base class of all objects
Definition ZFObjectCore.h:209
param for ZFPropertyDynamicRegister
Definition ZFPropertyDynamicRegister.h:42
void objectInfoT(zfstring &ret) const
see objectInfo
ZFPropertyCallbackValueReset propertyCustomImplCallbackValueReset(void) const
see ZFPropertyDynamicRegister
const zfstring & propertyTypeName(void) const
see ZFPropertyDynamicRegister
const ZFClass * propertyClassOfRetainProperty(void) const
see ZFPropertyDynamicRegister
ZFPropertyDynamicRegisterParam & zfunsafe_disableChecker(zfbool disableChecker)
see ZFPropertyDynamicRegister
ZFPropertyCallbackIsInitValue propertyCustomImplCallbackIsInitValue(void) const
see ZFPropertyDynamicRegister
ZFPropertyCallbackDynamicRegisterInitValueGetter propertyInitValueCallback(void) const
see ZFPropertyDynamicRegister
ZFPropertyDynamicRegisterParam & propertyCustomImpl(const ZFMethod *propertySetterMethod, const ZFMethod *propertyGetterMethod, ZFPropertyCallbackIsValueAccessed callbackIsValueAccessed, ZFPropertyCallbackIsInitValue callbackIsInitValue, ZFPropertyCallbackValueReset callbackValueReset)
see ZFPropertyDynamicRegister
ZFPropertyDynamicRegisterParam & propertyTypeName(const zfstring &propertyTypeName)
see ZFPropertyDynamicRegister
zfbool zfunsafe_disableChecker(void) const
see ZFPropertyDynamicRegister
zfstring objectInfo(void) const
return object info
Definition ZFPropertyDynamicRegister.h:121
ZFPropertyDynamicRegisterParam & propertyName(const zfstring &propertyName)
see ZFPropertyDynamicRegister
ZFPropertyDynamicRegisterParam & propertyGetterType(ZFMethodAccessType propertyGetterType)
see ZFPropertyDynamicRegister
ZFPropertyDynamicRegisterParam & propertyClassOfRetainProperty(const ZFClass *propertyClassOfRetainProperty)
see ZFPropertyDynamicRegister
ZFPropertyCallbackIsValueAccessed propertyCustomImplCallbackIsValueAccessed(void) const
see ZFPropertyDynamicRegister
ZFPropertyDynamicRegisterParam & dynamicRegisterUserData(ZFObject *dynamicRegisterUserData)
see ZFPropertyDynamicRegister
ZFPropertyDynamicRegisterParam & propertyInitValueCallback(ZFPropertyCallbackDynamicRegisterInitValueGetter propertyInitValueCallback)
see ZFPropertyDynamicRegister
ZFPropertyDynamicRegisterParam & propertySetterType(ZFMethodAccessType propertySetterType)
see ZFPropertyDynamicRegister
ZFPropertyDynamicRegisterParam & propertyTypeId(const zfstring &propertyTypeId)
see ZFPropertyDynamicRegister
const zfstring & propertyTypeId(void) const
see ZFPropertyDynamicRegister
const ZFMethod * propertyCustomImplSetterMethod(void) const
see ZFPropertyDynamicRegister
const ZFClass * ownerClass(void) const
see ZFPropertyDynamicRegister
ZFPropertyDynamicRegisterParam & ownerClass(const ZFClass *ownerClass)
see ZFPropertyDynamicRegister
const ZFMethod * propertyCustomImplGetterMethod(void) const
see ZFPropertyDynamicRegister
ZFMethodAccessType propertySetterType(void) const
see ZFPropertyDynamicRegister
zfany dynamicRegisterUserData(void) const
see ZFPropertyDynamicRegister
const zfstring & propertyName(void) const
see ZFPropertyDynamicRegister
ZFMethodAccessType propertyGetterType(void) const
see ZFPropertyDynamicRegister
info for a property for ZFObject, see ZFPROPERTY_RETAIN for more info
Definition ZFProperty.h:28
util method to cast ZFObject types freely
Definition zfany.h:35