projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add wxEventFilter and related functionality.
[wxWidgets.git]
/
interface
/
wx
/
scopeguard.h
diff --git
a/interface/wx/scopeguard.h
b/interface/wx/scopeguard.h
index c0a14ec1374194c1041d1cce4435f92226b2d07c..06769cc7e3d739a40f453aab046c9598fe59b6db 100644
(file)
--- 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$
// Purpose: interface of global functions
// Author: wxWidgets team
// RCS-ID: $Id$
-// Licence: wxWindows licen
s
e
+// Licence: wxWindows licen
c
e
/////////////////////////////////////////////////////////////////////////////
/**
/////////////////////////////////////////////////////////////////////////////
/**
+ @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.
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
{
*/
class wxScopeGuard
{
@@
-33,7
+38,7
@@
public:
void Dismiss();
};
void Dismiss();
};
-/** @
in
group group_funcmacro_misc */
+/** @
addto
group group_funcmacro_misc */
//@{
/**
Returns a scope guard object which will call the specified function with
//@{
/**
Returns a scope guard object which will call the specified function with
@@
-50,7
+55,7
@@
wxScopeGuard wxMakeGuard(F func, P1 p1, ..., PN pN);
//@}
//@}
-/** @
in
group group_funcmacro_misc */
+/** @
addto
group group_funcmacro_misc */
//@{
/**
Ensure that the global @a function with a few (up to some
//@{
/**
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)
//@}
#define wxON_BLOCK_EXIT3(function, p1, p2, p3)
//@}
-/** @
in
group group_funcmacro_misc */
+/** @
addto
group group_funcmacro_misc */
//@{
/**
This family of macros is similar to wxON_BLOCK_EXIT(), but calls a method
//@{
/**
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)
//@}
#define wxON_BLOCK_EXIT_OBJ3(object, method, p1, p2, p3)
//@}
-/** @
in
group group_funcmacro_misc */
+/** @
addto
group group_funcmacro_misc */
//@{
/**
This family of macros is similar to wxON_BLOCK_OBJ(), but calls a method
//@{
/**
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)
//@}
#define wxON_BLOCK_EXIT_THIS3(method, p1, p2, p3)
//@}
-/** @
in
group group_funcmacro_misc */
+/** @
addto
group group_funcmacro_misc */
//@{
/**
This macro sets a variable to the specified value on scope exit.
//@{
/**
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
}
@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}
@see wxON_BLOCK_EXIT_OBJ0(), wxON_BLOCK_EXIT_NULL()
@header{wx/scopeguard.h}