libosmscout  0.1
osmscout::Breaker Class Referenceabstract

#include <Breaker.h>

+ Inheritance diagram for osmscout::Breaker:

Public Member Functions

virtual void Break ()=0
 Stop the processing. More...
 
virtual bool IsAborted () const =0
 Return true, if the process was signaled to stop. More...
 
virtual void Reset ()=0
 Reset the state of the breaker. More...
 
virtual ~Breaker ()=default
 

Detailed Description

A breaker object instance allows to trigger cancelation of long running processes.

Constructor & Destructor Documentation

◆ ~Breaker()

virtual osmscout::Breaker::~Breaker ( )
virtualdefault

Member Function Documentation

◆ Break()

virtual void osmscout::Breaker::Break ( )
pure virtual

Stop the processing.

This is just a setting a flag that must actively get polled by the long running process. So while the process was signaled to stop, it can still continue for a while.

Returns

Implemented in osmscout::CancelableFuture< T >::FutureBreaker, and osmscout::ThreadedBreaker.

◆ IsAborted()

virtual bool osmscout::Breaker::IsAborted ( ) const
pure virtual

Return true, if the process was signaled to stop.

Returns
True, if signaled, else false

Implemented in osmscout::CancelableFuture< T >::FutureBreaker, and osmscout::ThreadedBreaker.

◆ Reset()

virtual void osmscout::Breaker::Reset ( )
pure virtual

Reset the state of the breaker.

Implemented in osmscout::CancelableFuture< T >::FutureBreaker, and osmscout::ThreadedBreaker.


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