Quick Links:

bal | bbl | bdl | bsl

Public Member Functions

bsls::ReviewFailureHandlerGuard Class Reference

#include <bsls_review.h>

List of all members.

Public Member Functions

 ReviewFailureHandlerGuard (Review::ViolationHandler temporary)
 ~ReviewFailureHandlerGuard ()

Detailed Description

An object of this class saves the current review handler and installs the one specified on construction. On destruction, the original review handler is restored. Note that two objects of this class cannot be safely used concurrently from two separate threads (but may of course appear sequentially, including in nested blocks and function invocations within a single thread). Note that the behavior of objects of this class is unaffected by the (static) Review::lockReviewAdministration method (i.e., the temporary replacement will occur, regardless of whether that method has been invoked).

See Component bsls_review


Constructor & Destructor Documentation

bsls::ReviewFailureHandlerGuard::ReviewFailureHandlerGuard ( Review::ViolationHandler  temporary  )  [explicit]

Create a guard object that installs the specified temporary review failure handler and automatically restores the original handler on destruction.

bsls::ReviewFailureHandlerGuard::~ReviewFailureHandlerGuard (  ) 

Restore the failure handler that was in place when this object was created and destroy this guard.


The documentation for this class was generated from the following file: