ZFFramework
 
Loading...
Searching...
No Matches
zfweak_fwd.h
Go to the documentation of this file.
1
5
6#ifndef _ZFI_zfweak_fwd_h_
7#define _ZFI_zfweak_fwd_h_
8
9#include "ZFObjectAutoPtr.h"
10#include "ZFTypeId.h"
11#include "ZFPropertyDeclare.h"
12
14
15// ============================================================
17 ZFOBJECT_DECLARE(_ZFP_I_zfweak, ZFObject)
18
20 cache->set(zfnull);
21 })
22
23public:
24 inline zfbool valid(void) {
25 return this->get() != zfnull;
26 }
27 inline void set(ZF_IN const zfany &obj) {
28 this->_ZFP_obj = obj;
29 }
30 inline zfany get(void) {
31 return this->_ZFP_obj;
32 }
33
34protected:
35 virtual void objectOnInit(ZF_IN ZFObject *obj) {
36 this->_ZFP_obj = obj;
37 }
38
40 virtual void objectOnInit(void) {
41 zfsuper::objectOnInit();
42 }
43
45 virtual void objectInfoImplAppend(ZF_IN_OUT zfstring &ret);
46
47public:
49 virtual zfidentity objectHashImpl(void);
51 virtual ZFCompareResult objectCompareImpl(ZF_IN ZFObject *anotherObj);
52
53public:
55 virtual zfbool objectIsInternal(void) {
56 return zftrue;
57 }
59 virtual zfbool objectIsInternalPrivate(void) {
60 return zftrue;
61 }
62
63public:
64 zfany _ZFP_obj;
65};
66
68#endif // #ifndef _ZFI_zfweak_fwd_h_
69
#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 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:180
#define ZF_IN_OUT
dummy macro that shows the param used as required input and output
Definition ZFCoreTypeDef_ClassType.h:196
_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 zfnull
same as NULL, defined for future use
Definition ZFCoreTypeDef_CoreType.h:88
ZFCompareResult
compare result of two ZFObjects
Definition ZFCoreTypeDef_OtherType.h:28
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
smart pointer for ZFObject
#define zfclass
same as class, shows that this class is a ZFObject type
Definition ZFObjectClassTypeFwd.h:38
#define ZFOBJECT_DECLARE(ChildClass, SuperClass,...)
necessary for every class inherit from ZFObject
Definition ZFObjectDeclare.h:126
#define ZFALLOC_CACHE_RELEASE(action)
mark class that it should apply cache logic when alloc
Definition ZFObjectRetain.h:186
macros to declare ZFProperty
reflectable type define
base class of all objects
Definition ZFObjectCore.h:209
util method to cast ZFObject types freely
Definition zfany.h:35