X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/bcffb4d1a9edaa539770382e14129ac902da68d8..a640295faab118deee570776f5a752c5056c0aad:/interface/wx/scopeguard.h diff --git a/interface/wx/scopeguard.h b/interface/wx/scopeguard.h index c0a14ec137..06769cc7e3 100644 --- a/interface/wx/scopeguard.h +++ b/interface/wx/scopeguard.h @@ -3,13 +3,18 @@ // 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 +38,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 +55,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 +83,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 +98,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 +113,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 +131,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}