SourcePro® 2021.1 |
SourcePro® API Reference Guide |
Product Documentation: SourcePro Documentation Home |
Classes and functions in this group provide an implementation of the Resource Acquisition Is Initialization (RAII) programming idiom. This idiom is useful for writing exception-safe code. It relies on guarantees provided by the C++ language to perform an action when control flow leaves the current scope.
Classes | |
class | RWScopeGuard0GImp< Fun > |
Derived RWScopeGuardImp for global or static member functions that take 0 parameters. More... | |
class | RWScopeGuard0MImp< Obj, Fun > |
Derived RWScopeGuardImp for member functions that take 0 parameters. More... | |
class | RWScopeGuard1GImp< Fun, P1 > |
Derived RWScopeGuardImp for global or static member functions that take 1 parameter. More... | |
class | RWScopeGuard1MImp< Obj, Fun, P1 > |
Derived RWScopeGuardImp for member functions that take 1 parameter. More... | |
class | RWScopeGuard2GImp< Fun, P1, P2 > |
Derived RWScopeGuardImp for global or static member functions that take 2 parameters. More... | |
class | RWScopeGuard2MImp< Obj, Fun, P1, P2 > |
Derived RWScopeGuardImp for member functions that take 2 parameters. More... | |
class | RWScopeGuard3GImp< Fun, P1, P2, P3 > |
Derived RWScopeGuardImp for global or static member functions that take 3 parameters. More... | |
class | RWScopeGuard3MImp< Obj, Fun, P1, P2, P3 > |
Derived RWScopeGuardImp for member functions that take 3 parameters. More... | |
class | RWScopeGuard4GImp< Fun, P1, P2, P3, P4 > |
Derived RWScopeGuardImp for global or static member functions that take 4 parameters. More... | |
class | RWScopeGuard4MImp< Obj, Fun, P1, P2, P3, P4 > |
Derived RWScopeGuardImp for member functions that take 4 parameters. More... | |
class | RWScopeGuard5GImp< Fun, P1, P2, P3, P4, P5 > |
Derived RWScopeGuardImp for global or static member functions that take 5 parameters. More... | |
class | RWScopeGuard5MImp< Obj, Fun, P1, P2, P3, P4, P5 > |
Derived RWScopeGuardImp for member functions that take 5 parameters. More... | |
class | RWScopeGuardImp |
Base class for derived RWScopeGuardImp classes. More... | |
Modules | |
rwtMakeScopeGuard Functions | |
Typedefs | |
typedef const RWScopeGuardImp & | RWScopeGuard |
Functions | |
template<class T > | |
RWTReferenceWrapper< T > | rwtMakeRef (T &t) |
typedef const RWScopeGuardImp& RWScopeGuard |
RWScopeGuard encapsulates a function to invoke and a set of parameters to pass to that function on exit from the current local scope. It can handle functions that take up to five parameters, and those parameters can be of any type.
If the action to be performed by the scope guard is no longer necessary, it may be canceled.
RWTReferenceWrapper<T> rwtMakeRef | ( | T & | t | ) |
Creates a wrapper around an object reference.
Copyright © 2021 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved. |