| The Gaudi Framework v28r2p1 (f1a77ff4)

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

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 163 of file StatusCode.h.

## Constructor & Destructor Documentation

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

Definition at line 166 of file StatusCode.h.

166 : m_enabled(StatusCode::checkingEnabled()) {
167 if (m_enabled) StatusCode::disableChecking();
168 }
StatusCode::checkingEnabled
static GAUDI_API bool checkingEnabled()
Definition: StatusCode.cpp:27
StatusCode::disableChecking
static GAUDI_API void disableChecking()
Definition: StatusCode.cpp:23
StatusCode::ScopedDisableChecking::m_enabled
bool m_enabled
Definition: StatusCode.h:164

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

Definition at line 169 of file StatusCode.h.

169 {
170 if (m_enabled) StatusCode::enableChecking();
171 }
StatusCode::enableChecking
static GAUDI_API void enableChecking()
Definition: StatusCode.cpp:19
StatusCode::ScopedDisableChecking::m_enabled
bool m_enabled
Definition: StatusCode.h:164

## Member Data Documentation

bool StatusCode::ScopedDisableChecking::m_enabled
| private

Definition at line 164 of file StatusCode.h.

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

- GaudiKernel/GaudiKernel/StatusCode.h