| The Gaudi Framework v29r1 (5cd95fa2)

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

170 : m_enabled( StatusCode::checkingEnabled() )
171 {
172 if ( m_enabled ) StatusCode::disableChecking();
173 }
StatusCode::checkingEnabled
static GAUDI_API bool checkingEnabled()
Definition: StatusCode.cpp:23
StatusCode::disableChecking
static GAUDI_API void disableChecking()
Definition: StatusCode.cpp:21
StatusCode::ScopedDisableChecking::m_enabled
bool m_enabled
Definition: StatusCode.h:167

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

Definition at line 174 of file StatusCode.h.

175 {
176 if ( m_enabled ) StatusCode::enableChecking();
177 }
StatusCode::enableChecking
static GAUDI_API void enableChecking()
Definition: StatusCode.cpp:19
StatusCode::ScopedDisableChecking::m_enabled
bool m_enabled
Definition: StatusCode.h:167

## Member Data Documentation

bool StatusCode::ScopedDisableChecking::m_enabled
| private

Definition at line 167 of file StatusCode.h.

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

- GaudiKernel/GaudiKernel/StatusCode.h