Orxonox  0.0.5 Codename: Arcturus
Classes | Namespaces | Macros | Typedefs | Functions
ScopeGuard.h File Reference
#include <loki/RefToValue.h>

Go to the source code of this file.

Classes

class  Loki::ObjScopeGuardImpl0< Obj, MemFun >
 Implementation class for a class per-instance member function with no parameters. More...
 
class  Loki::ObjScopeGuardImpl1< Obj, MemFun, P1 >
 Implementation class for a class per-instance member function with one parameter. More...
 
class  Loki::ObjScopeGuardImpl2< Obj, MemFun, P1, P2 >
 Implementation class for a class per-instance member function with two parameters. More...
 
class  Loki::ObjScopeGuardImpl3< Obj, MemFun, P1, P2, P3 >
 Implementation class for a class per-instance member function with three parameters. More...
 
class  Loki::ScopeGuardImpl0< F >
 Implementation class for a standalone function or class static function with no parameters. More...
 
class  Loki::ScopeGuardImpl1< F, P1 >
 Implementation class for a standalone function or class static function with one parameter. More...
 
class  Loki::ScopeGuardImpl2< F, P1, P2 >
 Implementation class for a standalone function or class static function with two parameters. More...
 
class  Loki::ScopeGuardImpl3< F, P1, P2, P3 >
 Implementation class for a standalone function or class static function with three parameters. More...
 
class  Loki::ScopeGuardImpl4< F, P1, P2, P3, P4 >
 Implementation class for a standalone function or class static function with four parameters. More...
 
class  Loki::ScopeGuardImpl5< F, P1, P2, P3, P4, P5 >
 Implementation class for a standalone function or class static function with five parameters. More...
 
class  Loki::ScopeGuardImplBase
 Base class used by all ScopeGuard implementations. More...
 

Namespaces

 Loki
 

Macros

#define LOKI_ANONYMOUS_VARIABLE(str)   LOKI_CONCATENATE(str, __LINE__)
 
#define LOKI_CONCATENATE(s1, s2)   LOKI_CONCATENATE_DIRECT(s1, s2)
 
#define LOKI_CONCATENATE_DIRECT(s1, s2)   s1##s2
 
#define LOKI_ON_BLOCK_EXIT   ::Loki::ScopeGuard LOKI_ANONYMOUS_VARIABLE(scopeGuard) = ::Loki::MakeGuard
 
#define LOKI_ON_BLOCK_EXIT_OBJ   ::Loki::ScopeGuard LOKI_ANONYMOUS_VARIABLE(scopeGuard) = ::Loki::MakeObjGuard
 

Typedefs

typedef const ScopeGuardImplBase & Loki::ScopeGuard
 
  More...
 

Functions

template<typename F >
ScopeGuardImpl0< F > Loki::MakeGuard (F fun)
 
template<typename F , typename P1 >
ScopeGuardImpl1< F, P1 > Loki::MakeGuard (F fun, P1 p1)
 
template<typename F , typename P1 , typename P2 >
ScopeGuardImpl2< F, P1, P2 > Loki::MakeGuard (F fun, P1 p1, P2 p2)
 
template<typename F , typename P1 , typename P2 , typename P3 >
ScopeGuardImpl3< F, P1, P2, P3 > Loki::MakeGuard (F fun, P1 p1, P2 p2, P3 p3)
 
template<typename F , typename P1 , typename P2 , typename P3 , typename P4 >
ScopeGuardImpl4< F, P1, P2, P3, P4 > Loki::MakeGuard (F fun, P1 p1, P2 p2, P3 p3, P4 p4)
 
template<typename F , typename P1 , typename P2 , typename P3 , typename P4 , typename P5 >
ScopeGuardImpl5< F, P1, P2, P3, P4, P5 > Loki::MakeGuard (F fun, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5)
 
template<typename Ret , class Obj1 , class Obj2 >
ObjScopeGuardImpl0< Obj1, Ret(Obj2::*)()> Loki::MakeGuard (Ret(Obj2::*memFun)(), Obj1 &obj)
 
template<typename Ret , class Obj1 , class Obj2 >
ObjScopeGuardImpl0< Obj1, Ret(Obj2::*)()> Loki::MakeGuard (Ret(Obj2::*memFun)(), Obj1 *obj)
 
template<typename Ret , class Obj1 , class Obj2 , typename P1a , typename P1b >
ObjScopeGuardImpl1< Obj1, Ret(Obj2::*)(P1a), P1b > Loki::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 > Loki::MakeGuard (Ret(Obj2::*memFun)(P1a), Obj1 *obj, P1b p1)
 
template<typename Ret , class Obj1 , class Obj2 , typename P1a , typename P1b , typename P2a , typename P2b >
ObjScopeGuardImpl2< Obj1, Ret(Obj2::*)(P1a, P2a), P1b, P2b > Loki::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 > Loki::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 , typename P3a , typename P3b >
ObjScopeGuardImpl3< Obj1, Ret(Obj2::*)(P1a, P2a, P3a), P1b, P2b, P3b > Loki::MakeGuard (Ret(Obj2::*memFun)(P1a, P2a, P3a), Obj1 &obj, P1b p1, P2b p2, P3b p3)
 
template<typename Ret , class Obj1 , class Obj2 , typename P1a , typename P1b , typename P2a , typename P2b , typename P3a , typename P3b >
ObjScopeGuardImpl3< Obj1, Ret(Obj2::*)(P1a, P2a, P3a), P1b, P2b, P3b > Loki::MakeGuard (Ret(Obj2::*memFun)(P1a, P2a, P3a), Obj1 *obj, P1b p1, P2b p2, P3b p3)
 
template<class Obj , typename MemFun >
ObjScopeGuardImpl0< Obj, MemFun > Loki::MakeObjGuard (Obj &obj, MemFun memFun)
 
template<class Obj , typename MemFun , typename P1 >
ObjScopeGuardImpl1< Obj, MemFun, P1 > Loki::MakeObjGuard (Obj &obj, MemFun memFun, P1 p1)
 
template<class Obj , typename MemFun , typename P1 , typename P2 >
ObjScopeGuardImpl2< Obj, MemFun, P1, P2 > Loki::MakeObjGuard (Obj &obj, MemFun memFun, P1 p1, P2 p2)
 
template<class Obj , typename MemFun , typename P1 , typename P2 , typename P3 >
ObjScopeGuardImpl3< Obj, MemFun, P1, P2, P3 > Loki::MakeObjGuard (Obj &obj, MemFun memFun, P1 p1, P2 p2, P3 p3)
 

Macro Definition Documentation

#define LOKI_ANONYMOUS_VARIABLE (   str)    LOKI_CONCATENATE(str, __LINE__)
#define LOKI_CONCATENATE (   s1,
  s2 
)    LOKI_CONCATENATE_DIRECT(s1, s2)
#define LOKI_CONCATENATE_DIRECT (   s1,
  s2 
)    s1##s2
#define LOKI_ON_BLOCK_EXIT   ::Loki::ScopeGuard LOKI_ANONYMOUS_VARIABLE(scopeGuard) = ::Loki::MakeGuard
#define LOKI_ON_BLOCK_EXIT_OBJ   ::Loki::ScopeGuard LOKI_ANONYMOUS_VARIABLE(scopeGuard) = ::Loki::MakeObjGuard