Type: info
Title: new: comphelper::FlagGuard
Posted by: [email protected]
Affected: -
Effective from: CWS dba34a
CWS:
<http://eis.services.openoffice.org/EIS2/cws.ShowCWS?Path=DEV300/dba34a>
CWS status: ready for QA
*Summary*
--------
+ comphelper/scopeguard.hxx: class FlagGuard
*Description*
-------------
The new class ::comphelper::FlagGuard, defined in
comphelper/scopeguard.hxx, is a specialization of
::comphelper::ScopeGuard, implementing the pattern (seen multiple
times all around the code) of resetting a flag when leaving a scope.
I.e.
{
someFlag = true;
FlagGuard aGuard( someFlag );
...
}
will ensure that at the end of the scope, "someFlag" has the value
"false", no matter how and where the scope is left.
Send feedback to [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]