|
Lely core libraries 2.3.5
|
An object providing the means to check if a stop request has been made for its associated lely::util::StopSource object. More...
#include <stop.hpp>
Public Member Functions | |
| StopToken () noexcept=default | |
| Constructs an empty stop token with no assiociated stop-state. | |
| StopToken (const StopToken &other) noexcept | |
| Constructs a stop token whose associated stop-state is the same as that if other. | |
| StopToken (StopToken &&other) noexcept | |
| Constructs a stop token whose associated stop-state is the same as that if other; other is left as valid stop token with no associated stop-state. | |
| StopToken & | operator= (const StopToken &other) noexcept |
Copy-assigns the stop-state of other to *this. | |
| StopToken & | operator= (StopToken &&other) noexcept |
Move-assigns the stop-state of other to *this. | |
| ~StopToken () | |
| Destroys a stop token. | |
| operator bool () const noexcept | |
Returns true if *this has a stop-state, and false otherwise. | |
| bool | stop_requested () const noexcept |
Returns true if *this has a stop-state and it has received a stop request, and false otherwise. | |
| bool | stop_possible () const noexcept |
Returns true if *this has a stop-state and it has received a stop request, or if it has an associated stop source that can still issue such a request, and false otherwise. | |
| void | swap (StopToken &other) noexcept |
Exchanges the stop-state of *this and other/. | |
Friends | |
| bool | operator== (const StopToken &lhs, const StopToken &rhs) noexcept |
Returns true if lhs and rhs have the same stop-state, and false otherwise. | |
| bool | operator!= (const StopToken &lhs, const StopToken &rhs) noexcept |
Returns false if lhs and rhs have the same stop-state, and true otherwise. | |
| void | swap (StopToken &lhs, StopToken &rhs) noexcept |
| Exchanges the stop-state of lhs with rhs. | |
An object providing the means to check if a stop request has been made for its associated lely::util::StopSource object.
It is essentially a thread-safe "view" of the associated stop-state.
|
defaultnoexcept |
Constructs an empty stop token with no assiociated stop-state.
false. false. Constructs a stop token whose associated stop-state is the same as that if other.
*this and other compare equal.
|
inlinenoexcept |
|
inline |
Destroys a stop token.
If *this has a stop-state, its ownership is released.
Copy-assigns the stop-state of other to *this.
*this and other compare equal.
|
inlinenoexcept |
Returns true if *this has a stop-state and it has received a stop request, and false otherwise.
|
inlinenoexcept |
Returns true if *this has a stop-state and it has received a stop request, or if it has an associated stop source that can still issue such a request, and false otherwise.