rad 6.2.0
Loading...
Searching...
No Matches
Public Member Functions | List of all members
rad::StopSource Class Reference

#include <stopToken.hpp>

Public Member Functions

 StopSource () noexcept
 
 StopSource (StopSource const &) noexcept
 
StopSourceoperator= (StopSource const &)
 
 StopSource (StopSource &&) noexcept=default
 
 ~StopSource ()
 
bool operator== (StopSource const &rhs) const noexcept
 
bool operator!= (StopSource const &rhs) const noexcept
 
bool StopRequested () const noexcept
 
bool StopPossible () const noexcept
 
StopToken GetToken () const noexcept
 
void Swap (StopSource &other) noexcept
 
bool RequestStop () noexcept
 

Detailed Description

Class that can request associated StopTokens to stop.

Constructor & Destructor Documentation

◆ StopSource() [1/3]

rad::StopSource::StopSource ( )
noexcept

◆ StopSource() [2/3]

rad::StopSource::StopSource ( StopSource const & rhs)
noexcept

◆ StopSource() [3/3]

rad::StopSource::StopSource ( StopSource && )
defaultnoexcept

◆ ~StopSource()

rad::StopSource::~StopSource ( )

Member Function Documentation

◆ GetToken()

StopToken rad::StopSource::GetToken ( ) const
noexcept

Get a stop token that can be stopped from this source.

◆ operator!=()

bool rad::StopSource::operator!= ( StopSource const & rhs) const
noexcept

◆ operator=()

StopSource & rad::StopSource::operator= ( StopSource const & rhs)

◆ operator==()

bool rad::StopSource::operator== ( StopSource const & rhs) const
noexcept
Returns
true if rhs and *this references the same shared state.
false otherwise.

◆ RequestStop()

bool rad::StopSource::RequestStop ( )
noexcept

Issue a request to stop to StopTokens.

Returns
true if the StopSource made a stop request.
false if no StopTokens are active.

◆ StopPossible()

bool rad::StopSource::StopPossible ( ) const
noexcept
Returns
true if there's at least 1 associated StopToken for this StopSource.
false otherwise.

◆ StopRequested()

bool rad::StopSource::StopRequested ( ) const
noexcept
Returns
true if stop has been requested.

◆ Swap()

void rad::StopSource::Swap ( StopSource & other)
noexcept

Swap two StopSources.


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