info/CWS undoapi : new: ::comphelper::FlagRestorationGuard
[email protected] Mon, 10 Jan 2011 13:14:34 +0100 (CET)
| Newsgroups | gmane.comp.openoffice.announce.interface |
|---|---|
| Message-ID | <11337906.31294661674232.JavaMail.root@so-web5> |
------=_Part_1573_18268244.1294661674230
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
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]
------=_Part_1573_18268244.1294661674230
Content-Type: text/plain; charset=us-ascii
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
------=_Part_1573_18268244.1294661674230--