ndn::security::tpm::CFReleaser< T > Class Template Reference

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

#include <helper-osx.hpp>

Inheritance diagram for ndn::security::tpm::CFReleaser< T >:
[legend]

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::security::tpm::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 48 of file helper-osx.hpp.

Constructor & Destructor Documentation

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

Definition at line 51 of file helper-osx.hpp.

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

Definition at line 56 of file helper-osx.hpp.

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

Definition at line 61 of file helper-osx.hpp.

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

Definition at line 84 of file helper-osx.hpp.

Member Function Documentation

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

Definition at line 91 of file helper-osx.hpp.

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

Definition at line 97 of file helper-osx.hpp.

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

Definition at line 109 of file helper-osx.hpp.

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

Definition at line 68 of file helper-osx.hpp.

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

Definition at line 78 of file helper-osx.hpp.

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

Definition at line 103 of file helper-osx.hpp.

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

Definition at line 136 of file helper-osx.hpp.

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

Definition at line 118 of file helper-osx.hpp.

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

Definition at line 128 of file helper-osx.hpp.