| The Gaudi Framework v32r1 (f65d50dc)

Public Member Functions | Private Attributes | List of all members
StatusCode::ScopedDisableChecking Class Reference

Simple RAII class to ignore unchecked StatusCode instances in a scope. More...

`#include <GaudiKernel/StatusCode.h>`

## Public Member Functions
| ScopedDisableChecking ()
| ~ScopedDisableChecking ()

## Private Attributes
bool | m_enabled

## Detailed Description

Simple RAII class to ignore unchecked StatusCode instances in a scope.

Example:

void myFunction() {
StatusCode sc1 = aFunction(); // must be checked
{
StatusCode::ScopedDisableChecking _sc_ignore;
StatusCode sc2 = anotherFunction(); // automatically ignored
}
}

Definition at line 211 of file StatusCode.h.

## Constructor & Destructor Documentation

## ◆ ScopedDisableChecking()

StatusCode::ScopedDisableChecking::ScopedDisableChecking | ( |  | ) |
| inline

Definition at line 215 of file StatusCode.h.

215 : m_enabled( StatusCode::checkingEnabled() ) {
216 if ( m_enabled ) StatusCode::disableChecking();
217 }
StatusCode::checkingEnabled
static GAUDI_API bool checkingEnabled()
Definition: StatusCode.cpp:46
StatusCode::disableChecking
static GAUDI_API void disableChecking()
Definition: StatusCode.cpp:44
StatusCode::ScopedDisableChecking::m_enabled
bool m_enabled
Definition: StatusCode.h:212

## ◆ ~ScopedDisableChecking()

StatusCode::ScopedDisableChecking::~ScopedDisableChecking | ( |  | ) |
| inline

Definition at line 218 of file StatusCode.h.

218 {
219 if ( m_enabled ) StatusCode::enableChecking();
220 }
StatusCode::enableChecking
static GAUDI_API void enableChecking()
Definition: StatusCode.cpp:42
StatusCode::ScopedDisableChecking::m_enabled
bool m_enabled
Definition: StatusCode.h:212

## Member Data Documentation

## ◆ m_enabled

bool StatusCode::ScopedDisableChecking::m_enabled
| private

Definition at line 212 of file StatusCode.h.

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

- GaudiKernel/GaudiKernel/StatusCode.h