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
19public:
20 inline zfbool valid(void) {
21 return this->get() != zfnull;
22 }
23 inline void set(ZF_IN const zfany &obj) {
24 this->_ZFP_obj = obj;
25 }
26 inline zfany get(void) {
27 return this->_ZFP_obj;
28 }
29
30protected:
31 virtual void objectOnInit(ZF_IN ZFObject *obj) {
32 this->_ZFP_obj = obj;
33 }
34
36 virtual void objectOnInit(void) {
37 zfsuper::objectOnInit();
38 }
39
41 virtual void objectInfoImplAppend(ZF_IN_OUT zfstring &ret);
42
43public:
45 virtual zfidentity objectHashImpl(void);
47 virtual ZFCompareResult objectCompareImpl(ZF_IN ZFObject *anotherObj);
48
49public:
51 virtual zfbool objectIsInternal(void) {
52 return zftrue;
53 }
55 virtual zfbool objectIsInternalPrivate(void) {
56 return zftrue;
57 }
58
59public:
60 zfany _ZFP_obj;
61};
62
64#endif // #ifndef _ZFI_zfweak_fwd_h_
65
#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:191
#define ZF_IN_OUT
dummy macro that shows the param used as required input and output
Definition ZFCoreTypeDef_ClassType.h:207
_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:123
macros to declare ZFProperty
reflectable type define
base class of all objects
Definition ZFObjectCore.h:195
util method to cast ZFObject types freely
Definition zfany.h:35