NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.3: NDN, CCN, CCNx, content centric networks
API Documentation
ndn::security::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 ()
 
bool operator== (std::nullptr_t)
 
bool operator!= (std::nullptr_t)
 

Detailed Description

template<class T>
class ndn::security::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 62 of file sec-tpm-osx.cpp.

Constructor & Destructor Documentation

◆ CFReleaser() [1/3]

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

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

◆ CFReleaser() [2/3]

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

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

◆ CFReleaser() [3/3]

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

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

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

◆ ~CFReleaser()

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

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

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

Member Function Documentation

◆ operator=() [1/2]

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

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

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

◆ operator=() [2/2]

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

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

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

◆ get() [1/2]

◆ get() [2/2]

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

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

◆ retain()

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

◆ release()

◆ operator==()

template<class T>
bool ndn::security::CFReleaser< T >::operator== ( std::nullptr_t  )
inline

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

◆ operator!=()

template<class T>
bool ndn::security::CFReleaser< T >::operator!= ( std::nullptr_t  )
inline

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


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