Type: info
Title: new: ::comphelper::FlagRestorationGuard
Posted by: [email protected]
Affected: -
TaskId: i33781
<http://www.openoffice.org/issues/show_bug.cgi?id=33781>
Effective from: CWS undoapi
CWS:
<http://eis.services.openoffice.org/EIS2/cws.ShowCWS?Path=DEV300/undoapi>
CWS status: new
*Summary*
--------
+ <comphelper/flagguard.hxx>
+ class FlagRestorationGuard
*Description*
-------------
FlagRestorartionGuard is a specialization of ::comphelper::ScopeGuard,
encapsulating the often-seen pattern of setting a certain boolean flag
to some value, and ensuring that it is reset to its previous value
upon leaving the current scope.
{
FlagRestorationGuard aGuard( bSomeFlag, true );
...
} // bSomeFlag will be reset to the value it had at the beginning of
the scope
Send feedback to [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]