| The Gaudi Framework v27r1

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

## Constructor & Destructor Documentation

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

Definition at line 168 of file StatusCode.h.

168 : m_enabled(StatusCode::checkingEnabled()) {
169 if (m_enabled) StatusCode::disableChecking();
170 }
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:166

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

Definition at line 171 of file StatusCode.h.

171 {
172 if (m_enabled) StatusCode::enableChecking();
173 }
StatusCode::enableChecking
static GAUDI_API void enableChecking()
Definition: StatusCode.cpp:19
StatusCode::ScopedDisableChecking::m_enabled
bool m_enabled
Definition: StatusCode.h:166

## Member Data Documentation

bool StatusCode::ScopedDisableChecking::m_enabled
| private

Definition at line 166 of file StatusCode.h.

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

- GaudiKernel/GaudiKernel/StatusCode.h