Orxonox: Loki::ObjScopeGuardImpl0< Obj, MemFun > Class Template Reference

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

`#include <src/util/ScopeGuard.h>`

Inheritance diagram for Loki::ObjScopeGuardImpl0< Obj, MemFun >:

List of all members.

## Public Member Functions

void | Execute ()
| ~ObjScopeGuardImpl0 () throw ()

## Static Public Member Functions

static ObjScopeGuardImpl0< Obj, MemFun > | MakeObjGuard (Obj &obj, MemFun memFun)

## Protected Member Functions

| ObjScopeGuardImpl0 (Obj &obj, MemFun memFun)

## Protected Attributes

MemFun | memFun_
Obj & | obj_

## Detailed Description

### template<class Obj, typename MemFun>
class Loki::ObjScopeGuardImpl0< Obj, MemFun >

Implementation class for a class per-instance member function with no parameters. 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>

Loki::ObjScopeGuardImpl0< Obj, MemFun >::~ObjScopeGuardImpl0 | ( |  | ) | throw ()`[inline]`

References Loki::ScopeGuardImplBase::SafeExecute().

template<class Obj, typename MemFun>

Loki::ObjScopeGuardImpl0< Obj, MemFun >::ObjScopeGuardImpl0 | ( | Obj & | obj,
|  | MemFun | memFun |
| ) |  |  | `[inline, protected]`

## Member Function Documentation

template<class Obj, typename MemFun>

void Loki::ObjScopeGuardImpl0< Obj, MemFun >::Execute | ( |  | ) | `[inline]`

References Loki::ObjScopeGuardImpl0< Obj, MemFun >::memFun_, and Loki::ObjScopeGuardImpl0< Obj, MemFun >::obj_.

template<class Obj, typename MemFun>

static ObjScopeGuardImpl0<Obj, MemFun> Loki::ObjScopeGuardImpl0< Obj, MemFun >::MakeObjGuard | ( | Obj & | obj,
|  | MemFun | memFun |
| ) |  |  | `[inline, static]`

## Member Data Documentation

template<class Obj, typename MemFun>

MemFun Loki::ObjScopeGuardImpl0< Obj, MemFun >::memFun_`[protected]`

Referenced by Loki::ObjScopeGuardImpl0< Obj, MemFun >::Execute().

template<class Obj, typename MemFun>

Obj& Loki::ObjScopeGuardImpl0< Obj, MemFun >::obj_`[protected]`

Referenced by Loki::ObjScopeGuardImpl0< Obj, MemFun >::Execute().

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

- src/util/ScopeGuard.h