Woman, Life, Freedom


Adaptive AUTOSAR
ARA public interface header documentation
ara::diag::CancellationHandler Class Referencefinal

A wrapper class around a conversation cancellation handler callback. More...

#include <cancellation_handler.h>

Public Member Functions

 CancellationHandler (CancellationHandler &&) noexcept=default
 
 CancellationHandler (CancellationHandler &)=delete
 
CancellationHandleroperator= (CancellationHandler &&) noexcept=default
 
CancellationHandleroperator= (CancellationHandler &)=delete
 
 CancellationHandler (bool isCanceled) noexcept
 Constructor. More...
 
bool IsCanceled () const
 Get conversation cancellation status. More...
 
void SetIsCanceled (bool isCanceled)
 Set conversation cancellation status. More...
 
void SetNotifier (std::function< void()> notifier)
 Set a callback to be invoked when DM canceled the conversation. More...
 

Detailed Description

A wrapper class around a conversation cancellation handler callback.

Constructor & Destructor Documentation

◆ CancellationHandler()

ara::diag::CancellationHandler::CancellationHandler ( bool  isCanceled)
noexcept

Constructor.

Parameters
isCanceledInitial cancellation status
Note
The constructor is not ARA compatible.

Member Function Documentation

◆ IsCanceled()

bool ara::diag::CancellationHandler::IsCanceled ( ) const

Get conversation cancellation status.

Returns
True if DM canceled the conversation, otherwise false

◆ SetIsCanceled()

void ara::diag::CancellationHandler::SetIsCanceled ( bool  isCanceled)

Set conversation cancellation status.

Parameters
isCanceledCurrent conversation cancellation status
Note
The method is not ARA compatible.

◆ SetNotifier()

void ara::diag::CancellationHandler::SetNotifier ( std::function< void()>  notifier)

Set a callback to be invoked when DM canceled the conversation.

Parameters
notifierA callback to be notified after the cancellation