ZFFramework
 
Loading...
Searching...
No Matches
ZFArgs.h
Go to the documentation of this file.
1
5
6#ifndef _ZFI_ZFArgs_h_
7#define _ZFI_ZFArgs_h_
8
9#include "zfany.h"
10
12
13// ============================================================
14// ZFArgs
15zfclassFwd _ZFP_ZFArgsPrivate;
21public:
26 zfany const &sender(void) const;
29
34 zfauto &result(void) const;
36 ZFArgs const &result(ZF_IN zfauto const &v) const;
39
40 /* ZFMETHOD_MAX_PARAM */
51 zfauto &param0(void) const;
53 ZFArgs const &param0(ZF_IN zfauto const &v) const;
56
58 zfauto &param1(void) const;
60 ZFArgs const &param1(ZF_IN zfauto const &v) const;
63
65 zfauto &param2(void) const;
67 ZFArgs const &param2(ZF_IN zfauto const &v) const;
70
72 zfauto &param3(void) const;
74 ZFArgs const &param3(ZF_IN zfauto const &v) const;
77
79 zfauto &param4(void) const;
81 ZFArgs const &param4(ZF_IN zfauto const &v) const;
84
86 zfauto &param5(void) const;
88 ZFArgs const &param5(ZF_IN zfauto const &v) const;
91
93 zfauto &param6(void) const;
95 ZFArgs const &param6(ZF_IN zfauto const &v) const;
98
100 zfauto &param7(void) const;
102 ZFArgs const &param7(ZF_IN zfauto const &v) const;
105
106public:
107 // ============================================================
111 zfbool success(void) const;
113 ZFArgs const &success(ZF_IN zfbool v) const;
116
120 zfstring const &errorHint(void) const;
122 ZFArgs const &errorHint(ZF_IN zfstring const &v) const;
125
130 zfbool ignoreError(void) const;
133
141
142public:
143 // ============================================================
147 const ZFMethod *ownerMethod(void) const;
150
154 const ZFProperty *ownerProperty(void) const;
157
158public:
159 // ============================================================
163 zfidentity const &eventId(void) const;
179
180public:
181 // ============================================================
185 zfauto callSuper(void) const;
186
203 );
208
212 ZFArgs const &param(ZF_IN zfindex index, ZF_IN zfauto const &v) const;
215
217 zfauto &propValue(void) const {return this->paramAt(0);}
219 ZFArgs const &propValue(ZF_IN zfauto const &v) const {return this->param(0, v);}
221 ZFArgs &propValue(ZF_IN zfauto const &v) {return this->param(0, v);}
222
224 zfauto &propValueOld(void) const {return this->paramAt(1);}
226 ZFArgs &propValueOld(ZF_IN zfauto const &v) {return this->param(1, v);}
227
228 // ============================================================
229public:
231 zfany const &o(void) const {return this->sender();}
233 zfauto p(ZF_IN const zfstring &paramName) const;
234
235 // ============================================================
236public:
240 ZFArgs(void);
244 ZFArgs(ZF_IN const ZFArgs &ref);
245
246public:
248 zffinal ~ZFArgs(void);
249 ZFArgs &operator = (ZF_IN const ZFArgs &ref);
250 zfbool operator == (ZF_IN const ZFArgs &ref) const;
251 inline zfbool operator != (ZF_IN const ZFArgs &ref) const {return !this->operator == (ref);}
253
254public:
258 zfstring objectInfo(void) const {
259 zfstring ret;
260 this->objectInfoT(ret);
261 return ret;
262 }
263
264public:
265 ZFArgs &_ZFP_ZFArgs_removeConst(void) const {
266 return const_cast<ZFArgs &>(*this);
267 }
268
269private:
270 _ZFP_ZFArgsPrivate *d;
271};
272
274#endif // #ifndef _ZFI_ZFArgs_h_
275
#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_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
_ZFT_t_zfindex zfindex
similar to size_t, used for index and size only
Definition ZFCoreTypeDef_CoreType.h:154
_zft_zfidentity zfidentity
identity type, ensured at least 32 bit, ensured unsigned
Definition ZFCoreTypeDef_CoreType.h:225
zft_zfstring< zfchar > zfstring
see zft_zfstring
Definition ZFCoreTypeDef_StringType.h:15
#define ZF_NAMESPACE_GLOBAL_BEGIN
begin namespace ZFFramework
Definition ZFNamespace.h:97
#define ZF_NAMESPACE_GLOBAL_END
end namespace ZFFramework
Definition ZFNamespace.h:98
listener data used by ZFListener
Definition ZFArgs.h:20
zfauto & param1(void) const
see param0
ZFArgs & paramInit(const ZFCoreArray< zfauto > &params)
util for impl to init all params
zfstring const & errorHint(void) const
error hint
ZFArgs & param4(zfauto const &v)
see param0
ZFArgs const & eventFiltered(zfbool v) const
see eventFiltered
ZFArgs const & errorHint(zfstring const &v) const
see errorHint
zfauto p(const zfstring &paramName) const
short form to access param by name
ZFArgs const & propValue(zfauto const &v) const
set property value
Definition ZFArgs.h:219
ZFArgs & param3(zfauto const &v)
see param0
ZFArgs & ignoreErrorEvent(zfbool v)
see ignoreErrorEvent
zfany const & sender(void) const
owner object or event sender, may be null
ZFArgs & paramInit(void)
util for impl to init all params with ZFMP_DEF
ZFArgs const & param6(zfauto const &v) const
see param0
zfbool ignoreErrorEvent(void) const
a hint flag that tell impl do not fire error event, while errorHint would still be stored
zfauto & param2(void) const
see param0
ZFArgs & param5(zfauto const &v)
see param0
zfauto & param0(void) const
params, may be null
ZFArgs const & param7(zfauto const &v) const
see param0
ZFArgs(const ZFArgs &ref)
construct with another data
void objectInfoT(zfstring &ret) const
see objectInfo
ZFArgs & sender(zfany const &v)
see sender
zfbool success(void) const
whether invoke success
zfauto & propValue(void) const
get property value
Definition ZFArgs.h:217
ZFArgs & param6(zfauto const &v)
see param0
ZFArgs & success(zfbool v)
see success
ZFArgs const & param1(zfauto const &v) const
see param0
ZFArgs & param(zfindex index, zfauto const &v)
set param at index
ZFArgs & param7(zfauto const &v)
see param0
ZFArgs & propValue(zfauto const &v)
set property value
Definition ZFArgs.h:221
zfauto & result(void) const
the result
ZFArgs & ownerProperty(const ZFProperty *v)
see ownerProperty
ZFArgs & param1(zfauto const &v)
see param0
ZFArgs & errorHint(zfstring const &v)
see errorHint
ZFArgs const & param2(zfauto const &v) const
see param0
ZFArgs const & success(zfbool v) const
see success
ZFArgs & paramInit(ZFObject *param0, ZFObject *param1, ZFObject *param2, ZFObject *param3, ZFObject *param4, ZFObject *param5, ZFObject *param6, ZFObject *param7)
util for impl to init all params
ZFArgs const & param0(zfauto const &v) const
see param0
zfbool ignoreError(void) const
a hint flag that tell impl to ignore error, no errorHint would be stored for performance
zfauto & param7(void) const
see param0
ZFArgs & eventFiltered(zfbool v)
see eventFiltered
ZFArgs const & param3(zfauto const &v) const
see param0
const ZFProperty * ownerProperty(void) const
owner property
ZFArgs & param2(zfauto const &v)
see param0
ZFArgs & ownerMethod(const ZFMethod *v)
see ownerMethod
ZFArgs & param0(zfauto const &v)
see param0
ZFArgs const & result(zfauto const &v) const
see result
zfauto & param6(void) const
see param0
zfstring objectInfo(void) const
get a short info of this object
Definition ZFArgs.h:258
zfauto & param5(void) const
see param0
ZFArgs & ignoreError(zfbool v)
see ignoreError
const ZFMethod * ownerMethod(void) const
owner method
ZFArgs(void)
main constructor
zfidentity const & eventId(void) const
event id, may be zfidentityInvalid
zfauto & param3(void) const
see param0
zfauto callSuper(void) const
util method for dynamic registered method to call parent's method
ZFArgs const & param(zfindex index, zfauto const &v) const
set param at index
ZFArgs & eventId(zfidentity const &v)
see eventId
ZFArgs & propValueOld(zfauto const &v)
set old property value
Definition ZFArgs.h:226
zfany const & o(void) const
short form to access sender
Definition ZFArgs.h:231
ZFArgs const & param5(zfauto const &v) const
see param0
ZFArgs const & param4(zfauto const &v) const
see param0
zfauto & propValueOld(void) const
get old property value
Definition ZFArgs.h:224
zfauto & param4(void) const
see param0
ZFArgs & result(zfauto const &v)
see result
zfauto & paramAt(zfindex index) const
get param at index
zfbool eventFiltered(void) const
used to achieve event filter logic
light weight array
Definition ZFCoreArray.h:331
reflectable method for ZFObject
Definition ZFMethod.h:252
base class of all objects
Definition ZFObjectCore.h:209
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
a ZFObject holder which would release content object automatically when destroyed
Definition zfautoFwd.h:34
util class to cast ZFObject types freely