A class hierarchy for cleaning up after durable resources. More...
#include <util.h>
Public Member Functions | |
void | dismiss () const |
Tell the guard that it does not need to invoke clean up function any more. | |
Protected Member Functions | |
guardBase (const guardBase &rhs) | |
Default constructor. | |
~guardBase () | |
Destructor. No need to be virtual. | |
Static Protected Member Functions | |
template<typename T > | |
static void | cleanup (T &task) throw () |
A template to invoke the function registered. | |
Protected Attributes | |
volatile bool | done_ |
A class hierarchy for cleaning up after durable resources.
It follows the example set by Loki::ScopeGuard, but simpler.
ibis::util::guardBase::guardBase | ( | const guardBase & | rhs | ) | [inline, protected] |
Default constructor.
Copy constructor. Allows all derived classes to use the compiler generated copy constructors.
References dismiss().
static void ibis::util::guardBase::cleanup | ( | T & | task | ) | throw () [inline, static, protected] |
A template to invoke the function registered.
Also absorbs all exceptions.
References ibis::gVerbose.
Referenced by ibis::util::guardImpl0< F >::~guardImpl0(), ibis::util::guardImpl1< F, A >::~guardImpl1(), ibis::util::guardImpl2< F, A1, A2 >::~guardImpl2(), and ibis::util::guardObj0< C, F >::~guardObj0().
void ibis::util::guardBase::dismiss | ( | ) | const [inline] |
Tell the guard that it does not need to invoke clean up function any more.
Referenced by ibis::blob::append(), ibis::bord::evaluateTerms(), guardBase(), ibis::part::reorderValues(), ibis::blob::writeData(), and ibis::bord::xgroupby().
![]() |