NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: NDN, CCN, CCNx, content centric networks
API Documentation
ndn::CFReleaser< T > Class Template Reference

Helper class to wrap CoreFoundation object pointers. More...

Public Member Functions

 CFReleaser ()
 
 CFReleaser (const T &typeRef)
 
 CFReleaser (const CFReleaser &inReleaser)
 
CFReleaseroperator= (const T &typeRef)
 
CFReleaseroperator= (const CFReleaser &inReleaser)
 
 ~CFReleaser ()
 
const T & get () const
 
T & get ()
 
void retain (const T &typeRef)
 
void release ()
 

Detailed Description

template<class T>
class ndn::CFReleaser< T >

Helper class to wrap CoreFoundation object pointers.

The class is similar in spirit to shared_ptr, but uses CoreFoundation mechanisms to retain/release object.

Original implementation by Christopher Hunt and it was borrowed from http://www.cocoabuilder.com/archive/cocoa/130776-auto-cfrelease-and.html

Definition at line 61 of file sec-tpm-osx.cpp.

Constructor & Destructor Documentation

◆ CFReleaser() [1/3]

template<class T>
ndn::CFReleaser< T >::CFReleaser ( )
inline

Definition at line 67 of file sec-tpm-osx.cpp.

◆ CFReleaser() [2/3]

template<class T>
ndn::CFReleaser< T >::CFReleaser ( const T &  typeRef)
inline

Definition at line 72 of file sec-tpm-osx.cpp.

◆ CFReleaser() [3/3]

template<class T>
ndn::CFReleaser< T >::CFReleaser ( const CFReleaser< T > &  inReleaser)
inline

Definition at line 77 of file sec-tpm-osx.cpp.

References ndn::CFReleaser< T >::retain().

◆ ~CFReleaser()

template<class T>
ndn::CFReleaser< T >::~CFReleaser ( )
inline

Definition at line 100 of file sec-tpm-osx.cpp.

References ndn::CFReleaser< T >::release().

Member Function Documentation

◆ operator=() [1/2]

template<class T>
CFReleaser& ndn::CFReleaser< T >::operator= ( const T &  typeRef)
inline

Definition at line 84 of file sec-tpm-osx.cpp.

References ndn::CFReleaser< T >::release().

◆ operator=() [2/2]

template<class T>
CFReleaser& ndn::CFReleaser< T >::operator= ( const CFReleaser< T > &  inReleaser)
inline

Definition at line 94 of file sec-tpm-osx.cpp.

References ndn::CFReleaser< T >::retain().

◆ get() [1/2]

◆ get() [2/2]

template<class T>
T& ndn::CFReleaser< T >::get ( )
inline

Definition at line 125 of file sec-tpm-osx.cpp.

◆ retain()

template<class T>
void ndn::CFReleaser< T >::retain ( const T &  typeRef)
inline

◆ release()

template<class T>
void ndn::CFReleaser< T >::release ( )
inline

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