RAII object to manage automatic deregistration.
More...
#include <register.hpp>
RAII object to manage automatic deregistration.
- Thread Safety
- thread-compatible
Definition at line 149 of file register.hpp.
|
| template<class CounterType, class MetadataType, class Mutex> |
| class | Register |
| |
◆ ScopedRegistration() [1/3]
| perfc::ScopedRegistration::ScopedRegistration |
( |
| ) |
|
|
defaultnoexcept |
◆ ScopedRegistration() [2/3]
◆ ~ScopedRegistration()
| perfc::ScopedRegistration::~ScopedRegistration |
( |
| ) |
|
|
inlinenoexcept |
◆ ScopedRegistration() [3/3]
| perfc::ScopedRegistration::ScopedRegistration |
( |
std::function< void()> | dereg | ) |
|
|
inlineprotected |
◆ IsValid()
| bool perfc::ScopedRegistration::IsValid |
( |
| ) |
const |
|
inlinenoexcept |
- Returns
- true if it still manages a deregistration.
Definition at line 164 of file register.hpp.
◆ operator bool()
| perfc::ScopedRegistration::operator bool |
( |
| ) |
const |
|
inlinenoexcept |
- Returns
- true if it still manages a deregistration.
Definition at line 170 of file register.hpp.
◆ operator=()
◆ Release()
| void perfc::ScopedRegistration::Release |
( |
| ) |
|
|
inlinenoexcept |
Release ownership such that destroying object will not deregister counter.
- Postcondition
IsValid() == false
Definition at line 183 of file register.hpp.
◆ Reset()
| void perfc::ScopedRegistration::Reset |
( |
| ) |
|
|
inlinenoexcept |
Deregisters counter if object is managing a registration.
- Postcondition
IsValid() == false
Definition at line 192 of file register.hpp.
◆ Swap()
Swaps two entries.
- Parameters
-
| other | Exchanges ownership between *this and other. |
◆ Register
template<class CounterType, class MetadataType, class Mutex>
- Note
- From C++20
std::function(function&&) is noexcept
Definition at line 210 of file register.hpp.
The documentation for this class was generated from the following file: