|
ACE 8.0.5
|
Helper template to implement auto_ptr<>-like classes, but executing a functor in the destructor, instead of always deleting things. More...
#include <Auto_Functor.h>
Public Types | |
| typedef X | element_type |
| typedef Functor | functor_type |
Public Member Functions | |
| Auto_Functor (X *p=nullptr, Functor functor=Functor()) | |
| Constructor. | |
| Auto_Functor (Auto_Functor &rhs) | |
| Auto_Functor< X, Functor > & | operator= (Auto_Functor &rhs) |
| template<typename Y > | |
| Auto_Functor (Auto_Functor< Y, Functor > &rhs) | |
| template<typename Y > | |
| Auto_Functor< X, Functor > & | operator= (Auto_Functor< Y, Functor > &rhs) |
| ~Auto_Functor () | |
| X & | operator* () const |
| X * | operator-> () const |
| X * | get () |
| X * | release () |
| void | reset (X *p=nullptr) |
| void | reset (X *p, Functor f) |
| Functor const & | functor () const |
| Auto_Functor (Auto_Functor_Ref< X, Functor > rhs) | |
| Auto_Functor< X, Functor > & | operator= (Auto_Functor_Ref< X, Functor > rhs) |
| template<typename Y > | |
| operator Auto_Functor_Ref< Y, Functor > () | |
| template<typename Y > | |
| operator Auto_Functor< Y, Functor > () | |
| template<typename Y > | |
| ACE_Utils::Auto_Functor< X, Functor > & | operator= (Auto_Functor< Y, Functor > &rhs) |
Private Attributes | |
| X * | p_ |
| Functor | f_ |
Helper template to implement auto_ptr<>-like classes, but executing a functor in the destructor, instead of always deleting things.
The functor is called in the destructor, and it must implement:
Functor() noexcept;
Functor(Functor const &) noexcept;
Functor & operator=(Functor const &) noexcept;
void operator()(X * p) noexcept;
| typedef X ACE_Utils::Auto_Functor< X, Functor >::element_type |
| typedef Functor ACE_Utils::Auto_Functor< X, Functor >::functor_type |
|
inlineexplicit |
Constructor.
|
inline |
|
inline |
| ACE_Utils::Auto_Functor< X, Functor >::~Auto_Functor | ( | ) |
|
inline |
|
inline |
| ACE_Utils::Auto_Functor< X, Functor >::operator Auto_Functor< Y, Functor > | ( | ) |
| ACE_Utils::Auto_Functor< X, Functor >::operator Auto_Functor_Ref< Y, Functor > | ( | ) |
|
inline |
|
inline |
|
inline |
| Auto_Functor< X, Functor > & ACE_Utils::Auto_Functor< X, Functor >::operator= | ( | Auto_Functor< Y, Functor > & | rhs | ) |
|
inline |
|
inline |
|
inline |