| The Gaudi Framework v29r0 (ff2e7097)

- 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
boost::threadpool::detail::scope_guard Class Reference

`#include <src/threadpool/boost/threadpool/detail/scope_guard.hpp>`

Inheritance diagram for boost::threadpool::detail::scope_guard:
[legend]
Collaboration diagram for boost::threadpool::detail::scope_guard:
[legend]

## Public Member Functions
| scope_guard (function0< void > const &call_on_exit)
| ~scope_guard ()
void | disable ()

## Private Attributes
function0< void > const | m_function
bool | m_is_active

## Detailed Description

Definition at line 29 of file scope_guard.hpp.

## Constructor & Destructor Documentation

boost::threadpool::detail::scope_guard::scope_guard | ( | function0< void > const & | call_on_exit | ) |
| inline

Definition at line 36 of file scope_guard.hpp.

37 : m_function(call_on_exit)
38 , m_is_active(true)
39 {
40 }
boost::threadpool::detail::scope_guard::m_function
function0< void > const m_function
Definition: scope_guard.hpp:32
boost::threadpool::detail::scope_guard::m_is_active
bool m_is_active
Definition: scope_guard.hpp:33

boost::threadpool::detail::scope_guard::~scope_guard | ( |  | ) |
| inline

Definition at line 42 of file scope_guard.hpp.

43 {
44 if(m_is_active && m_function)
45 {
46 m_function();
47 }
48 }
boost::threadpool::detail::scope_guard::m_function
function0< void > const m_function
Definition: scope_guard.hpp:32
boost::threadpool::detail::scope_guard::m_is_active
bool m_is_active
Definition: scope_guard.hpp:33

## Member Function Documentation

void boost::threadpool::detail::scope_guard::disable | ( |  | ) |
| inline

Definition at line 50 of file scope_guard.hpp.

51 {
52 m_is_active = false;
53 }
boost::threadpool::detail::scope_guard::m_is_active
bool m_is_active
Definition: scope_guard.hpp:33

## Member Data Documentation

function0<void> const boost::threadpool::detail::scope_guard::m_function
| private

Definition at line 32 of file scope_guard.hpp.

bool boost::threadpool::detail::scope_guard::m_is_active
| private

Definition at line 33 of file scope_guard.hpp.

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

- GaudiMTTools/src/threadpool/boost/threadpool/detail/scope_guard.hpp