info/CWS undoapi : new: ::comphelper::FlagRestorationGuard

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

info/CWS undoapi : new: ::comphelper::FlagRestorationGuard

frank.schoenheit


          Type: info
         Title: new: ::comphelper::FlagRestorationGuard
     Posted by: [hidden email]
      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 [hidden email]



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]