6#ifndef _ZFI_ZFObjectAutoPtr_h_
7#define _ZFI_ZFObjectAutoPtr_h_
17 template<
typename T_ZFObject>
18 _ZFP_zfobjReleaseInScopeContainer(
ZF_IN T_ZFObject obj)
22 ~_ZFP_zfobjReleaseInScopeContainer(
void) {
30 template<
typename T_ZFObject>
31 _ZFP_zfunsafe_zfobjReleaseInScopeContainer(
ZF_IN T_ZFObject obj)
35 ~_ZFP_zfunsafe_zfobjReleaseInScopeContainer(
void) {
52#define zfobjReleaseInScope(obj) \
53 _ZFP_zfobjReleaseInScopeContainer ZFUniqueName(zfobjReleaseInScope) (obj)
55#define zfunsafe_zfobjReleaseInScope(obj) \
56 _ZFP_zfunsafe_zfobjReleaseInScopeContainer ZFUniqueName(zfobjReleaseInScope) (obj)
71template<
typename T_ZFObjectBase>
84 template<
typename P0,
typename P1>
85 zfobj(P0
const &p0, P1
const &p1)
89 template<
typename P0,
typename P1,
typename P2>
90 zfobj(P0
const &p0, P1
const &p1, P2
const &p2)
94 template<
typename P0,
typename P1,
typename P2,
typename P3>
95 zfobj(P0
const &p0, P1
const &p1, P2
const &p2, P3
const &p3)
99 template<
typename P0,
typename P1,
typename P2,
typename P3,
typename P4>
100 zfobj(P0
const &p0, P1
const &p1, P2
const &p2, P3
const &p3, P4
const &p4)
104 template<
typename P0,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5>
105 zfobj(P0
const &p0, P1
const &p1, P2
const &p2, P3
const &p3, P4
const &p4, P5
const &p5)
109 template<
typename P0,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6>
110 zfobj(P0
const &p0, P1
const &p1, P2
const &p2, P3
const &p3, P4
const &p4, P5
const &p5, P6
const &p6)
114 template<
typename P0,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7>
115 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)
121 zfauto::operator = (obj);
125 zfauto::operator = ((
zfauto const &)obj);
129 zfauto::operator = ((
zfauto const &)obj);
132 template<
typename T_ZFObject>
134 zfauto::operator = (obj);
139 template<
typename T_ZFObject>
140 inline zfbool operator == (
ZF_IN T_ZFObject
const &obj)
const {
141 return this->
toObject() == _ZFP_zfanyCast(obj);
143 template<
typename T_ZFObject>
144 inline zfbool operator != (
ZF_IN T_ZFObject
const &obj)
const {
145 return this->
toObject() != _ZFP_zfanyCast(obj);
149 T_ZFObjectBase *operator -> (
void)
const {
#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 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:184
_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 zfunsafe_zfobjRelease(obj)
no lock version of zfobjRelease, use with caution
Definition ZFObjectRetain.h:151
#define zfobjRelease(obj)
release an object, see ZFObject
Definition ZFObjectRetain.h:148
#define zfunsafe_zfobjAlloc(T_ZFObject,...)
no lock version of zfobjAlloc, use with caution
Definition ZFObjectRetain.h:107
base class of all objects
Definition ZFObjectCore.h:196
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:89
type restrict version of zfauto
Definition zfautoFwd.h:108
util class to alloc and hold ZFObject type
Definition ZFObjectAutoPtr.h:72
smart pointer for ZFObject
#define zfcast(T_To, obj)
safely cast ZFObject types, return null if not desired type
Definition zfcast.h:24