Loki::ObjScopeGuardImpl1< Obj, MemFun, P1 > Class Template Reference
[Exception-safe code]

#include <src/util/ScopeGuard.h>

Inheritance diagram for Loki::ObjScopeGuardImpl1< Obj, MemFun, P1 >:

Loki::ScopeGuardImplBase

List of all members.

Public Member Functions

void Execute ()
 ~ObjScopeGuardImpl1 () throw ()

Static Public Member Functions

static ObjScopeGuardImpl1< Obj,
MemFun, P1 > 
MakeObjGuard (Obj &obj, MemFun memFun, P1 p1)

Protected Member Functions

 ObjScopeGuardImpl1 (Obj &obj, MemFun memFun, P1 p1)

Protected Attributes

MemFun memFun_
Obj & obj_
const P1 p1_


Detailed Description

template<class Obj, typename MemFun, typename P1>
class Loki::ObjScopeGuardImpl1< Obj, MemFun, P1 >

Implementation class for a class per-instance member function with one parameter. The parameter is copied by value - use Loki::ByRef if you must use a reference instead. ScopeGuard ignores any value returned from the call within the Execute function.

This class has 3 standalone helper functions which create a ScopeGuard. One is MakeObjGuard, which is deprecated but provided for older code. The other two are MakeGuard overloads, one which takes a pointer to an object, and the other which takes a reference.


Constructor & Destructor Documentation

template<class Obj, typename MemFun, typename P1>
Loki::ObjScopeGuardImpl1< Obj, MemFun, P1 >::~ObjScopeGuardImpl1 (  )  throw () [inline]

template<class Obj, typename MemFun, typename P1>
Loki::ObjScopeGuardImpl1< Obj, MemFun, P1 >::ObjScopeGuardImpl1 ( Obj &  obj,
MemFun  memFun,
P1  p1 
) [inline, protected]


Member Function Documentation

template<class Obj, typename MemFun, typename P1>
void Loki::ObjScopeGuardImpl1< Obj, MemFun, P1 >::Execute (  )  [inline]

template<class Obj, typename MemFun, typename P1>
static ObjScopeGuardImpl1<Obj, MemFun, P1> Loki::ObjScopeGuardImpl1< Obj, MemFun, P1 >::MakeObjGuard ( Obj &  obj,
MemFun  memFun,
P1  p1 
) [inline, static]


Member Data Documentation

template<class Obj, typename MemFun, typename P1>
MemFun Loki::ObjScopeGuardImpl1< Obj, MemFun, P1 >::memFun_ [protected]

template<class Obj, typename MemFun, typename P1>
Obj& Loki::ObjScopeGuardImpl1< Obj, MemFun, P1 >::obj_ [protected]

template<class Obj, typename MemFun, typename P1>
const P1 Loki::ObjScopeGuardImpl1< Obj, MemFun, P1 >::p1_ [protected]


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

Generated on Tue Jul 28 16:22:16 2009 for Orxonox by  doxygen 1.5.6