6#ifndef _ZFI_ZFObjectAutoPtr_h_
7#define _ZFI_ZFObjectAutoPtr_h_
24 template<
typename T_ZFObject>
25 _ZFP_zfscopeReleaseContainer(
ZF_IN T_ZFObject obj)
29 ~_ZFP_zfscopeReleaseContainer(
void) {
37 template<
typename T_ZFObject>
38 _ZFP_zfunsafe_zfscopeReleaseContainer(
ZF_IN T_ZFObject obj)
42 ~_ZFP_zfunsafe_zfscopeReleaseContainer(
void) {
59#define zfscopeRelease(obj) \
60 _ZFP_zfscopeReleaseContainer ZFUniqueName(zfscopeRelease) (obj)
62#define zfunsafe_zfscopeRelease(obj) \
63 _ZFP_zfunsafe_zfscopeReleaseContainer ZFUniqueName(zfscopeRelease) (obj)
78template<
typename T_ZFObjectBase>
91 template<
typename P0,
typename P1>
92 zfobj(P0
const &p0, P1
const &p1)
96 template<
typename P0,
typename P1,
typename P2>
97 zfobj(P0
const &p0, P1
const &p1, P2
const &p2)
101 template<
typename P0,
typename P1,
typename P2,
typename P3>
102 zfobj(P0
const &p0, P1
const &p1, P2
const &p2, P3
const &p3)
106 template<
typename P0,
typename P1,
typename P2,
typename P3,
typename P4>
107 zfobj(P0
const &p0, P1
const &p1, P2
const &p2, P3
const &p3, P4
const &p4)
111 template<
typename P0,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5>
112 zfobj(P0
const &p0, P1
const &p1, P2
const &p2, P3
const &p3, P4
const &p4, P5
const &p5)
116 template<
typename P0,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6>
117 zfobj(P0
const &p0, P1
const &p1, P2
const &p2, P3
const &p3, P4
const &p4, P5
const &p5, P6
const &p6)
121 template<
typename P0,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7>
122 zfobj(P0
const &p0, P1
const &p1, P2
const &p2, P3
const &p3, P4
const &p4, P5
const &p5, P6
const &p6, P7
const &p7)
128 zfauto::operator = (obj);
132 zfauto::operator = ((
zfauto const &)obj);
136 zfauto::operator = ((
zfauto const &)obj);
139 template<
typename T_ZFObject>
141 zfauto::operator = (obj);
146 template<
typename T_ZFObject>
147 inline zfbool operator == (
ZF_IN T_ZFObject
const &obj)
const {
148 return this->
toObject() == _ZFP_zfanyCast(obj);
150 template<
typename T_ZFObject>
151 inline zfbool operator != (
ZF_IN T_ZFObject
const &obj)
const {
152 return this->
toObject() != _ZFP_zfanyCast(obj);
156 T_ZFObjectBase *operator -> (
void)
const {
#define ZFLIB_ZFCore
used to export symbols
Definition ZFCoreEnvDef.h:30
#define ZFCOREPOINTER_DECLARE(T_ZFCorePointer, pointerRetainAction, pointerDeleteAction)
declare your custom ZFCorePointerT type
Definition ZFCorePointer.h:347
#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 zfextend
dummy macro shows class inherit from another
Definition ZFCoreTypeDef_ClassType.h:53
#define ZF_IN
dummy macro that shows the param used as required input
Definition ZFCoreTypeDef_ClassType.h:180
_ZFT_t_zfbool zfbool
bool type
Definition ZFCoreTypeDef_CoreType.h:103
#define ZF_NAMESPACE_GLOBAL_BEGIN
begin namespace ZFFramework
Definition ZFNamespace.h:97
#define ZF_NAMESPACE_GLOBAL_END
end namespace ZFFramework
Definition ZFNamespace.h:98
retain count logic for ZFFramework
#define zfRelease(obj)
release an object, see ZFObject
Definition ZFObjectRetain.h:148
#define zfunsafe_zfRelease(obj)
no lock version of zfRelease, use with caution
Definition ZFObjectRetain.h:151
#define zfunsafe_zfAlloc(T_ZFObject,...)
no lock version of zfAlloc, use with caution
Definition ZFObjectRetain.h:107
#define zfRetain(obj)
retain an object, see ZFObject
Definition ZFObjectRetain.h:128
see ZFCorePointerT
Definition ZFObjectAutoPtr.h:19
base class of all objects
Definition ZFObjectCore.h:205
a ZFObject holder which would release content object automatically when destroyed
Definition zfautoFwd.h:34
void zfunsafe_assign(ZFObject *obj)
no lock version of object assign, for low level impl only
ZFObject * toObject(void) const
get the holded object
Definition zfautoFwd.h:94
type restrict version of zfauto
Definition zfautoFwd.h:113
util class to alloc and hold ZFObject type
Definition ZFObjectAutoPtr.h:79
smart pointer for ZFObject
#define zfcast(T_To, obj)
safely cast ZFObject types, return null if not desired type
Definition zfcast.h:28