Type: info
         Title: new: ::comphelper::FlagRestorationGuard
     Posted by: frank.schoenh...@sun.com
      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 interface-announce@openoffice.org


---------------------------------------------------------------------
To unsubscribe, e-mail: interface-announce-unsubscr...@openoffice.org
For additional commands, e-mail: interface-announce-h...@openoffice.org

Reply via email to