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

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

#include <cf-releaser-osx.hpp>

Inheritance diagram for ndn::detail::CFReleaser< T >:

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 ()
 
bool operator== (const std::nullptr_t &)
 
bool operator!= (const std::nullptr_t &)
 
void retain (const T &typeRef)
 
void retain ()
 
void release ()
 

Detailed Description

template<class T>
class ndn::detail::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

Note
The filename cf-releaser-osx.hpp is an intentional violation of code-style rule 2.1. Having '-osx' suffix is necessary to prevent installation on non-macOS platforms.

Definition at line 49 of file cf-releaser-osx.hpp.

Constructor & Destructor Documentation

◆ CFReleaser() [1/3]

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

Definition at line 52 of file cf-releaser-osx.hpp.

◆ CFReleaser() [2/3]

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

Definition at line 57 of file cf-releaser-osx.hpp.

◆ CFReleaser() [3/3]

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

Definition at line 62 of file cf-releaser-osx.hpp.

◆ ~CFReleaser()

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

Definition at line 85 of file cf-releaser-osx.hpp.

Member Function Documentation

◆ operator=() [1/2]

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

Definition at line 69 of file cf-releaser-osx.hpp.

◆ operator=() [2/2]

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

Definition at line 79 of file cf-releaser-osx.hpp.

◆ get() [1/2]

◆ get() [2/2]

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

Definition at line 98 of file cf-releaser-osx.hpp.

◆ operator==()

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

Definition at line 104 of file cf-releaser-osx.hpp.

◆ operator!=()

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

Definition at line 110 of file cf-releaser-osx.hpp.

◆ retain() [1/2]

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

Definition at line 117 of file cf-releaser-osx.hpp.

Referenced by ndn::security::tpm::getKeyRef().

◆ retain() [2/2]

◆ release()


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