#include <resource_blocker.h>
|
| User () |
| By default, does not use any Resource. More...
|
|
| User (Resource &resource) |
| Attempt to start using the given Resource. More...
|
|
| User (User &other) |
| Use the same Resource that other uses, if any. More...
|
|
| User (User &&other) noexcept |
| Take over the Resource that other uses, if any. More...
|
|
User & | operator= (User const &other) |
| Release our own Resource, if any, and then start using the Resource that other uses, if any. More...
|
|
User & | operator= (User &&other) noexcept |
| Release our own resource, if any, and then steal the Resource that other uses, if any, so that other will not use it any more. More...
|
|
| operator bool () |
| Return true if we hold the Resource in 'used' state. More...
|
|
bool | operator! () |
| Return false if we hold the Resource in 'used' state. More...
|
|
Resource::String_set | block_reasons () |
| Return the set of strings that explain the reasons why the resource was blocked. More...
|
|
void | end_use () |
| Stop holding the Resource in 'used' state, if we do. More...
|
|
| ~User () |
| Stop holding the Resource in 'used' state, if we do. More...
|
|
◆ User() [1/4]
resource_blocker::User::User |
( |
| ) |
|
|
inline |
By default, does not use any Resource.
◆ User() [2/4]
resource_blocker::User::User |
( |
Resource & |
resource | ) |
|
|
inlineexplicit |
Attempt to start using the given Resource.
This may fail, so the caller must check if it succeeded or not, using operator bool
or operator!
.
◆ User() [3/4]
resource_blocker::User::User |
( |
User & |
other | ) |
|
|
inline |
Use the same Resource that other
uses, if any.
◆ User() [4/4]
resource_blocker::User::User |
( |
User && |
other | ) |
|
|
inlinenoexcept |
Take over the Resource that other
uses, if any.
◆ ~User()
resource_blocker::User::~User |
( |
| ) |
|
|
inline |
Stop holding the Resource in 'used' state, if we do.
◆ block_reasons()
Return the set of strings that explain the reasons why the resource was blocked.
◆ end_use()
void resource_blocker::User::end_use |
( |
| ) |
|
|
inline |
Stop holding the Resource in 'used' state, if we do.
◆ operator bool()
resource_blocker::User::operator bool |
( |
| ) |
|
|
inlineexplicit |
Return true if we hold the Resource in 'used' state.
◆ operator!()
bool resource_blocker::User::operator! |
( |
| ) |
|
|
inline |
Return false if we hold the Resource in 'used' state.
◆ operator=() [1/2]
User & resource_blocker::User::operator= |
( |
User && |
other | ) |
|
|
inlinenoexcept |
Release our own resource, if any, and then steal the Resource that other
uses, if any, so that other
will not use it any more.
◆ operator=() [2/2]
User & resource_blocker::User::operator= |
( |
User const & |
other | ) |
|
|
inline |
Release our own Resource, if any, and then start using the Resource that other
uses, if any.
◆ m_block_reasons
◆ m_resource
The documentation for this class was generated from the following file: