| The Gaudi Framework v30r0 (c919700c)

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

## Constructor & Destructor Documentation

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

Definition at line 142 of file StatusCode.h.

142 : m_enabled( StatusCode::checkingEnabled() )
143 {
144 if ( m_enabled ) StatusCode::disableChecking();
145 }
StatusCode::checkingEnabled
static GAUDI_API bool checkingEnabled()
Definition: StatusCode.cpp:22
StatusCode::disableChecking
static GAUDI_API void disableChecking()
Definition: StatusCode.cpp:20
StatusCode::ScopedDisableChecking::m_enabled
bool m_enabled
Definition: StatusCode.h:139

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

Definition at line 146 of file StatusCode.h.

147 {
148 if ( m_enabled ) StatusCode::enableChecking();
149 }
StatusCode::enableChecking
static GAUDI_API void enableChecking()
Definition: StatusCode.cpp:18
StatusCode::ScopedDisableChecking::m_enabled
bool m_enabled
Definition: StatusCode.h:139

## Member Data Documentation

bool StatusCode::ScopedDisableChecking::m_enabled
| private

Definition at line 139 of file StatusCode.h.

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

- GaudiKernel/GaudiKernel/StatusCode.h