An object providing the means to issue a stop request.
More...
#include <stop.hpp>
|
| StopSource () |
| Constructs a stop source with a new stop-state. More...
|
|
| StopSource (stop_source_t *source) noexcept |
| Constructs an empty stop source with no assiociated stop-state. More...
|
|
| StopSource (const StopSource &other) noexcept |
| Constructs a stop source whose associated stop-state is the same as that if other. More...
|
|
| StopSource (StopSource &&other) noexcept |
| Constructs a stop source whose associated stop-state is the same as that if other; other is left as valid stop source with no associated stop-state. More...
|
|
StopSource & | operator= (const StopSource &other) noexcept |
| Copy-assigns the stop-state of other to *this . More...
|
|
StopSource & | operator= (StopSource &&other) noexcept |
| Move-assigns the stop-state of other to *this . More...
|
|
| ~StopSource () |
| Destroys a stop source. More...
|
|
| operator bool () const noexcept |
| Returns true if *this has a stop-state, and false otherwise.
|
|
bool | request_stop () noexcept |
| Issues a stop requests to the stop-state, if *this has a stop-state` and it has not already received a stop request. More...
|
|
bool | stop_requested () const noexcept |
| Returns true if *this has a stop-state and it has received a stop request, and false otherwise. More...
|
|
bool | stop_possible () const noexcept |
| Returns true if *this has a stop-state, and false otherwise.
|
|
void | swap (StopSource &other) noexcept |
| Exchanges the stop-state of *this and other/.
|
|
StopToken | get_token () const noexcept |
| Returns a stop token associated with the stop-state of *this , if it has any, and a default-constructed (empty) stop token otherwise.
|
|
An object providing the means to issue a stop request.
A stop request is visible to all lely::util::StopSource and lely::util::StopToken objects of the same associated stop-state.
Definition at line 179 of file stop.hpp.
◆ StopSource() [1/4]
lely::util::StopSource::StopSource |
( |
| ) |
|
|
inline |
◆ StopSource() [2/4]
Constructs an empty stop source with no assiociated stop-state.
- Postcondition
- stop_possible() returns
false
.
Definition at line 195 of file stop.hpp.
◆ StopSource() [3/4]
lely::util::StopSource::StopSource |
( |
const StopSource & |
other | ) |
|
|
inlinenoexcept |
Constructs a stop source whose associated stop-state is the same as that if other.
- Postcondition
*this
and other compare equal.
- See also
- stop_source_acquire()
Definition at line 205 of file stop.hpp.
◆ StopSource() [4/4]
lely::util::StopSource::StopSource |
( |
StopSource && |
other | ) |
|
|
inlinenoexcept |
Constructs a stop source whose associated stop-state is the same as that if other; other is left as valid stop source with no associated stop-state.
- Postcondition
other.stop_possible()
returns false
.
Definition at line 215 of file stop.hpp.
◆ ~StopSource()
lely::util::StopSource::~StopSource |
( |
| ) |
|
|
inline |
◆ operator=() [1/2]
◆ operator=() [2/2]
Move-assigns the stop-state of other to *this
.
After the assignment, *this
contains the previous stop-state of other, and other has no stop-state.
- Postcondition
other.stop_possible()
returns false
.
Definition at line 243 of file stop.hpp.
◆ request_stop()
bool lely::util::StopSource::request_stop |
( |
| ) |
|
|
inlinenoexcept |
◆ stop_requested()
bool lely::util::StopSource::stop_requested |
( |
| ) |
const |
|
inlinenoexcept |
The documentation for this class was generated from the following file: