ZFFramework
Loading...
Searching...
No Matches
Public Member Functions | List of all members
zfauto Class Reference

a ZFObject holder which would release content object automatically when destroyed More...

#include <zfautoFwd.h>

Inheritance diagram for zfauto:
zfautoT< T_ZFObjectBase > zfobj< T_ZFObjectBase >

Public Member Functions

void zfunsafe_assign (ZFObject *obj)
 no lock version of object assign, for low level impl only
 
void zfunsafe_assign (zfauto const &obj)
 no lock version of object assign, for low level impl only
 
zfindex objectRetainCount (void) const
 get current retain count
 
ZFObjecttoObject (void) const
 get the holded object
 
template<typename T_ZFObject >
T_ZFObject to (void) const
 cast by zfunsafe_zfcast
 
ZFV zfv (void) const
 see ZFV
 

Detailed Description

a ZFObject holder which would release content object automatically when destroyed

useful to hold a ZFObject as temp return value:

zfauto yourFunc(void) {
// alloc an object for return
// use zfauto to wrap the returned object
return zfauto(obj);
}
{
zfauto value = yourFunc();
ZFObject *obj = value;
} // content obj would be released when zfauto destroyed
base class of all objects
Definition ZFObjectCore.h:209
a ZFObject holder which would release content object automatically when destroyed
Definition zfautoFwd.h:34
util class to alloc and hold ZFObject type
Definition ZFObjectAutoPtr.h:164

The documentation for this class was generated from the following file: