rad  3.0.0
Public Member Functions | List of all members
rad::cii::CancellationToken Class Reference

#include <utils.hpp>

Public Member Functions

 CancellationToken ()
 
 CancellationToken (const CancellationToken &)=default
 
CancellationTokenoperator= (const CancellationToken &)=default
 
void Cancel ()
 
bool IsCancelled () const
 
 CancellationToken ()
 
 CancellationToken (const CancellationToken &)=default
 
CancellationTokenoperator= (const CancellationToken &)=default
 
void Cancel ()
 
bool IsCancelled () const
 
 CancellationToken ()
 
 CancellationToken (const CancellationToken &)=default
 
CancellationTokenoperator= (const CancellationToken &)=default
 
void Cancel ()
 
bool IsCancelled () const
 

Detailed Description

This class can be used to notify when a 'service' has been cancelled.

For example it is returned by the RouteReply() function to give the possibility to the user to check when a request has been cancelled and there is no point to keep waiting for a reply.

Remarks
This is thread compatible.

Constructor & Destructor Documentation

◆ CancellationToken() [1/6]

rad::cii::CancellationToken::CancellationToken ( )
inline

This constructor initialize the cancellation token to false.

◆ CancellationToken() [2/6]

rad::cii::CancellationToken::CancellationToken ( const CancellationToken )
default

◆ CancellationToken() [3/6]

rad::cii::CancellationToken::CancellationToken ( )
inline

This constructor initialize the cancellation token to false.

◆ CancellationToken() [4/6]

rad::cii::CancellationToken::CancellationToken ( const CancellationToken )
default

◆ CancellationToken() [5/6]

rad::cii::CancellationToken::CancellationToken ( )
inline

This constructor initialize the cancellation token to false.

◆ CancellationToken() [6/6]

rad::cii::CancellationToken::CancellationToken ( const CancellationToken )
default

Member Function Documentation

◆ Cancel() [1/3]

void rad::cii::CancellationToken::Cancel ( )
inline

This method can be used to notify that the "service" has been cancelled.

◆ Cancel() [2/3]

void rad::cii::CancellationToken::Cancel ( void  )
inline

This method can be used to notify that the "service" has been cancelled.

◆ Cancel() [3/3]

void rad::cii::CancellationToken::Cancel ( void  )
inline

This method can be used to notify that the "service" has been cancelled.

◆ IsCancelled() [1/3]

bool rad::cii::CancellationToken::IsCancelled ( ) const
inline

This method can be used to check whether the "service" has been cancelled.

Returns
true If the service has been cancelled, false otherwise.

◆ IsCancelled() [2/3]

bool rad::cii::CancellationToken::IsCancelled ( ) const
inline

This method can be used to check whether the "service" has been cancelled.

Returns
true If the service has been cancelled, false otherwise.

◆ IsCancelled() [3/3]

bool rad::cii::CancellationToken::IsCancelled ( ) const
inline

This method can be used to check whether the "service" has been cancelled.

Returns
true If the service has been cancelled, false otherwise.

◆ operator=() [1/3]

CancellationToken& rad::cii::CancellationToken::operator= ( const CancellationToken )
default

◆ operator=() [2/3]

CancellationToken& rad::cii::CancellationToken::operator= ( const CancellationToken )
default

◆ operator=() [3/3]

CancellationToken& rad::cii::CancellationToken::operator= ( const CancellationToken )
default

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