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

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

#include <cf-releaser-osx.hpp>

Inheritance diagram for ndn::util::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::util::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

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

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

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

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

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

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

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

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

Member Function Documentation

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

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

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

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

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

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

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

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

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

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

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

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


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