X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/bcffb4d1a9edaa539770382e14129ac902da68d8..92c0fc34c104c8d7c12d6a3b78ea232690fc23f4:/interface/wx/scopeguard.h diff --git a/interface/wx/scopeguard.h b/interface/wx/scopeguard.h index c0a14ec137..8da75963a4 100644 --- a/interface/wx/scopeguard.h +++ b/interface/wx/scopeguard.h @@ -2,14 +2,18 @@ // Name: scopeguard.h // Purpose: interface of global functions // Author: wxWidgets team -// RCS-ID: $Id$ -// Licence: wxWindows license +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// /** + @class wxScopeGuard + Scope guard is an object which allows executing an action on scope exit. The objects of this class must be constructed using wxMakeGuard() function. + + @nolibrary + @category{misc} */ class wxScopeGuard { @@ -33,7 +37,7 @@ public: void Dismiss(); }; -/** @ingroup group_funcmacro_misc */ +/** @addtogroup group_funcmacro_misc */ //@{ /** Returns a scope guard object which will call the specified function with @@ -50,7 +54,7 @@ wxScopeGuard wxMakeGuard(F func, P1 p1, ..., PN pN); //@} -/** @ingroup group_funcmacro_misc */ +/** @addtogroup group_funcmacro_misc */ //@{ /** Ensure that the global @a function with a few (up to some @@ -78,7 +82,7 @@ wxScopeGuard wxMakeGuard(F func, P1 p1, ..., PN pN); #define wxON_BLOCK_EXIT3(function, p1, p2, p3) //@} -/** @ingroup group_funcmacro_misc */ +/** @addtogroup group_funcmacro_misc */ //@{ /** This family of macros is similar to wxON_BLOCK_EXIT(), but calls a method @@ -93,7 +97,7 @@ wxScopeGuard wxMakeGuard(F func, P1 p1, ..., PN pN); #define wxON_BLOCK_EXIT_OBJ3(object, method, p1, p2, p3) //@} -/** @ingroup group_funcmacro_misc */ +/** @addtogroup group_funcmacro_misc */ //@{ /** This family of macros is similar to wxON_BLOCK_OBJ(), but calls a method @@ -108,7 +112,7 @@ wxScopeGuard wxMakeGuard(F func, P1 p1, ..., PN pN); #define wxON_BLOCK_EXIT_THIS3(method, p1, p2, p3) //@} -/** @ingroup group_funcmacro_misc */ +/** @addtogroup group_funcmacro_misc */ //@{ /** This macro sets a variable to the specified value on scope exit. @@ -126,6 +130,9 @@ wxScopeGuard wxMakeGuard(F func, P1 p1, ..., PN pN); } @endcode + Notice that @a value is copied, i.e. stored by value, so it can be a + temporary object returned by a function call, for example. + @see wxON_BLOCK_EXIT_OBJ0(), wxON_BLOCK_EXIT_NULL() @header{wx/scopeguard.h}