yat  0.10.4pre
Public Member Functions
theplu::yat::utility::Deleter Class Reference

Functor that deletes an object. More...

#include </scratch/bob/jari/tmp/pristine/yat-0.10.x/yat/utility/Deleter.h>

List of all members.

Public Member Functions

 Deleter (bool active=true)
 constructor
bool active (void) const
template<typename T >
void operator() (T *ptr) const

Detailed Description

Functor that deletes an object.

The class is typically used as second argument to a boost::shared_ptr, which enables to decide at runtime whether the shared_ptr should own the pointee, i.e., should the pointee be destructed at destruction of last shared_ptr pointing to the pointee.

Since:
New in yat 0.10

Constructor & Destructor Documentation

theplu::yat::utility::Deleter::Deleter ( bool  active = true)

constructor

Parameters:
activedecides whether functor will delete object or not. See operator().

Member Function Documentation

bool theplu::yat::utility::Deleter::active ( void  ) const
Returns:
true if class is activated.
template<typename T >
void theplu::yat::utility::Deleter::operator() ( T *  ptr) const
inline

Delete ptr if active() otherwise do nothing


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

Generated on Mon Nov 11 2013 09:41:45 for yat by  doxygen 1.8.1