52 : dismissed_(other.dismissed_)
58 static void SafeExecute(J& j)
throw()
70 mutable bool dismissed_;
75 void Dismiss()
const throw()
108 template <
typename F>
115 template <
typename F,
typename P1>
140 template <
typename F,
typename P1>
147 template <
typename F,
typename P1,
typename P2>
173 template <
typename F,
typename P1,
typename P2>
180 template <
typename F,
typename P1,
typename P2,
typename P3>
197 ScopeGuardImpl3(F fun, P1 p1, P2 p2, P3 p3) : fun_(fun), p1_(p1), p2_(p2), p3_(p3)
206 template <
typename F,
typename P1,
typename P2,
typename P3>
215 template <
class Obj,
typename MemFun>
233 : obj_(obj), memFun_(memFun) {}
238 template <
class Obj,
typename MemFun>
245 template <
class Obj,
typename MemFun,
typename P1>
259 (obj_.*memFun_)(p1_);
263 : obj_(obj), memFun_(memFun), p1_(p1) {}
269 template <
class Obj,
typename MemFun,
typename P1>
276 template <
class Obj,
typename MemFun,
typename P1,
typename P2>
290 (obj_.*memFun_)(p1_, p2_);
294 : obj_(obj), memFun_(memFun), p1_(p1), p2_(p2) {}
301 template <
class Obj,
typename MemFun,
typename P1,
typename P2>
307 #define CONCATENATE_DIRECT(s1, s2) s1##s2
308 #define CONCATENATE(s1, s2) CONCATENATE_DIRECT(s1, s2)
309 #define ANONYMOUS_VARIABLE(str) CONCATENATE(str, __LINE__)
312 # define UNUSED_VARIABLE __attribute__((unused))
314 # define UNUSED_VARIABLE
317 #define ON_BLOCK_EXIT ScopeGuard UNUSED_VARIABLE ANONYMOUS_VARIABLE(scopeGuard) = MakeGuard
318 #define ON_BLOCK_EXIT_OBJ ScopeGuard UNUSED_VARIABLE ANONYMOUS_VARIABLE(scopeGuard) = MakeObjGuard
320 #endif //SCOPEGUARD_H_
scope guard class
Definition: ScopeGuard.h:116
scope guard class
Definition: ScopeGuard.h:43
scope guard class
Definition: ScopeGuard.h:85
scope guard class
Definition: ScopeGuard.h:216
scope guard class
Definition: ScopeGuard.h:181
templated class for ScopeGuard to hold a c++ reference
Definition: ScopeGuard.h:22
scope guard class
Definition: ScopeGuard.h:246
scope guard class
Definition: ScopeGuard.h:148
scope guard class
Definition: ScopeGuard.h:277