IOSS 2.0

Classes | Macros | Functions
Ioss_ScopeGuard.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Classes
class | RefHolder< T >
class | ScopeGuardImplBase
class | ScopeGuardImpl0< F >
class | ScopeGuardImpl1< F, P1 >
class | ScopeGuardImpl2< F, P1, P2 >
class | ScopeGuardImpl3< F, P1, P2, P3 >
class | ObjScopeGuardImpl0< Obj, MemFun >
class | ObjScopeGuardImpl1< Obj, MemFun, P1 >
class | ObjScopeGuardImpl2< Obj, MemFun, P1, P2 >

## Macros
#define | CONCATENATE_DIRECT(s1, s2) s1##s2
#define | CONCATENATE(s1, s2) CONCATENATE_DIRECT(s1, s2)
#define | ANONYMOUS_VARIABLE(str) CONCATENATE(str, __LINE__)
#define | ON_BLOCK_EXIT ScopeGuard ANONYMOUS_VARIABLE(scopeGuard) = MakeGuard
#define | ON_BLOCK_EXIT_OBJ ScopeGuard ANONYMOUS_VARIABLE(scopeGuard) = MakeObjGuard

## Functions
template<class T >
RefHolder< T > | ByRef (T &t)
| __attribute__ ((unused)) typedef const ScopeGuardImplBase &ScopeGuard
template<typename F >
ScopeGuardImpl0< F > | MakeGuard (F fun)
template<typename F , typename P1 >
ScopeGuardImpl1< F, P1 > | MakeGuard (F fun, P1 p1)
template<typename F , typename P1 , typename P2 >
ScopeGuardImpl2< F, P1, P2 > | MakeGuard (F fun, P1 p1, P2 p2)
template<typename F , typename P1 , typename P2 , typename P3 >
ScopeGuardImpl3< F, P1, P2, P3 > | MakeGuard (F fun, P1 p1, P2 p2, P3 p3)
template<class Obj , typename MemFun >
ObjScopeGuardImpl0< Obj, MemFun > | MakeObjGuard (Obj &obj, MemFun memFun)
template<typename Ret , class Obj1 , class Obj2 >
ObjScopeGuardImpl0< Obj1, Ret(Obj2::*)()> | MakeGuard (Ret(Obj2::*memFun)(), Obj1 &obj)
template<typename Ret , class Obj1 , class Obj2 >
ObjScopeGuardImpl0< Obj1, Ret(Obj2::*)()> | MakeGuard (Ret(Obj2::*memFun)(), Obj1 *obj)
template<class Obj , typename MemFun , typename P1 >
ObjScopeGuardImpl1< Obj, MemFun, P1 > | MakeObjGuard (Obj &obj, MemFun memFun, P1 p1)
template<typename Ret , class Obj1 , class Obj2 , typename P1a , typename P1b >
ObjScopeGuardImpl1< Obj1, Ret(Obj2::*)(P1a), P1b > | MakeGuard (Ret(Obj2::*memFun)(P1a), Obj1 &obj, P1b p1)
template<typename Ret , class Obj1 , class Obj2 , typename P1a , typename P1b >
ObjScopeGuardImpl1< Obj1, Ret(Obj2::*)(P1a), P1b > | MakeGuard (Ret(Obj2::*memFun)(P1a), Obj1 *obj, P1b p1)
template<class Obj , typename MemFun , typename P1 , typename P2 >
ObjScopeGuardImpl2< Obj, MemFun, P1, P2 > | MakeObjGuard (Obj &obj, MemFun memFun, P1 p1, P2 p2)
template<typename Ret , class Obj1 , class Obj2 , typename P1a , typename P1b , typename P2a , typename P2b >
ObjScopeGuardImpl2< Obj1, Ret(Obj2::*)(P1a, P2a), P1b, P2b > | MakeGuard (Ret(Obj2::*memFun)(P1a, P2a), Obj1 &obj, P1b p1, P2b p2)
template<typename Ret , class Obj1 , class Obj2 , typename P1a , typename P1b , typename P2a , typename P2b >
ObjScopeGuardImpl2< Obj1, Ret(Obj2::*)(P1a, P2a), P1b, P2b > | MakeGuard (Ret(Obj2::*memFun)(P1a, P2a), Obj1 *obj, P1b p1, P2b p2)

## Macro Definition Documentation

## ◆ ANONYMOUS_VARIABLE

#define ANONYMOUS_VARIABLE | ( |  | str | ) | CONCATENATE(str, __LINE__)

## ◆ CONCATENATE

#define CONCATENATE | ( |  | s1,
|  |  | s2
| ) |  | CONCATENATE_DIRECT(s1, s2)

## ◆ CONCATENATE_DIRECT

#define CONCATENATE_DIRECT | ( |  | s1,
|  |  | s2
| ) |  | s1##s2

## ◆ ON_BLOCK_EXIT

#define ON_BLOCK_EXIT ScopeGuard ANONYMOUS_VARIABLE(scopeGuard) = MakeGuard

## ◆ ON_BLOCK_EXIT_OBJ

#define ON_BLOCK_EXIT_OBJ ScopeGuard ANONYMOUS_VARIABLE(scopeGuard) = MakeObjGuard

## Function Documentation

## ◆ __attribute__()

__attribute__ | ( | (unused) |  | ) | const &

## ◆ ByRef()

template<class T >

RefHolder<T> ByRef | ( | T & | t | ) |
| inline

## ◆ MakeGuard() [1/10]

template<typename F >

ScopeGuardImpl0<F> MakeGuard | ( | F | fun | ) |
| inline

## ◆ MakeGuard() [2/10]

template<typename F , typename P1 >

ScopeGuardImpl1<F, P1> MakeGuard | ( | F | fun,
|  | P1 | p1
| ) |  |
| inline

## ◆ MakeGuard() [3/10]

template<typename F , typename P1 , typename P2 >

ScopeGuardImpl2<F, P1, P2> MakeGuard | ( | F | fun,
|  | P1 | p1,
|  | P2 | p2
| ) |  |
| inline

## ◆ MakeGuard() [4/10]

template<typename F , typename P1 , typename P2 , typename P3 >

ScopeGuardImpl3<F, P1, P2, P3> MakeGuard | ( | F | fun,
|  | P1 | p1,
|  | P2 | p2,
|  | P3 | p3
| ) |  |
| inline

## ◆ MakeGuard() [5/10]

template<typename Ret , class Obj1 , class Obj2 >

ObjScopeGuardImpl0<Obj1, Ret (Obj2::*)()> MakeGuard | ( | Ret(Obj2::*)() | memFun,
|  | Obj1 & | obj
| ) |  |
| inline

## ◆ MakeGuard() [6/10]

template<typename Ret , class Obj1 , class Obj2 >

ObjScopeGuardImpl0<Obj1, Ret (Obj2::*)()> MakeGuard | ( | Ret(Obj2::*)() | memFun,
|  | Obj1 * | obj
| ) |  |
| inline

## ◆ MakeGuard() [7/10]

template<typename Ret , class Obj1 , class Obj2 , typename P1a , typename P1b >

ObjScopeGuardImpl1<Obj1, Ret (Obj2::*)(P1a), P1b> MakeGuard | ( | Ret(Obj2::*)(P1a) | memFun,
|  | Obj1 & | obj,
|  | P1b | p1
| ) |  |
| inline

## ◆ MakeGuard() [8/10]

template<typename Ret , class Obj1 , class Obj2 , typename P1a , typename P1b >

ObjScopeGuardImpl1<Obj1, Ret (Obj2::*)(P1a), P1b> MakeGuard | ( | Ret(Obj2::*)(P1a) | memFun,
|  | Obj1 * | obj,
|  | P1b | p1
| ) |  |
| inline

## ◆ MakeGuard() [9/10]

template<typename Ret , class Obj1 , class Obj2 , typename P1a , typename P1b , typename P2a , typename P2b >

ObjScopeGuardImpl2<Obj1, Ret (Obj2::*)(P1a, P2a), P1b, P2b> MakeGuard | ( | Ret(Obj2::*)(P1a, P2a) | memFun,
|  | Obj1 & | obj,
|  | P1b | p1,
|  | P2b | p2
| ) |  |
| inline

## ◆ MakeGuard() [10/10]

template<typename Ret , class Obj1 , class Obj2 , typename P1a , typename P1b , typename P2a , typename P2b >

ObjScopeGuardImpl2<Obj1, Ret (Obj2::*)(P1a, P2a), P1b, P2b> MakeGuard | ( | Ret(Obj2::*)(P1a, P2a) | memFun,
|  | Obj1 * | obj,
|  | P1b | p1,
|  | P2b | p2
| ) |  |
| inline

## ◆ MakeObjGuard() [1/3]

template<class Obj , typename MemFun >

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

## ◆ MakeObjGuard() [2/3]

template<class Obj , typename MemFun , typename P1 >

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

## ◆ MakeObjGuard() [3/3]

template<class Obj , typename MemFun , typename P1 , typename P2 >

ObjScopeGuardImpl2<Obj, MemFun, P1, P2> MakeObjGuard | ( | Obj & | obj,
|  | MemFun | memFun,
|  | P1 | p1,
|  | P2 | p2
| ) |  |
| inline