    

 ## On this page

  

 

 # CancelBase Struct Reference

 Last update: 16.07.2025 

[CancelBase](struct_cancel_base.xhtml "CancelBase provides an Interface to incorporate cancelling of computations in different ways...") provides an Interface to incorporate cancelling of computations in different ways. [More...](struct_cancel_base.xhtml#details)

## <a name="pub-methods"></a>Public Member Functions

virtual bool [cancel](struct_cancel_base.xhtml#ae34e24836f54808a79018854faec5383) ()=0 Virtual destructor for safety reasons. [More...](#ae34e24836f54808a79018854faec5383)  
 virtual bool [isCancelled](struct_cancel_base.xhtml#abf66400947187c9d1488661356df12f4) ()=0 Returns the cancel state of the instance. The cancel state is false as long as no call to the cancel function took place. [More...](#abf66400947187c9d1488661356df12f4)  
 <a id="details" name="details"></a>## Detailed Description

[CancelBase](struct_cancel_base.xhtml "CancelBase provides an Interface to incorporate cancelling of computations in different ways...") provides an Interface to incorporate cancelling of computations in different ways.



## Member Function Documentation

<a id="ae34e24836f54808a79018854faec5383"></a>## [◆ ](#ae34e24836f54808a79018854faec5383)cancel()

 virtual bool cancel  ( )   pure virtual 

Virtual destructor for safety reasons.

A call to this function sets an instance into the cancelled state for which the function isCancelled will return true. The return value may be used in multi-threaded enveironments to determine the thread actually cancelling.

ReturnsTrue iff this call actually was the cancel that execeuted; Implemented in [SimpleCancel](class_simple_cancel.xhtml#adc7ad0a041e23fea7e65a7b4a4da9ec7).





<a id="abf66400947187c9d1488661356df12f4"></a>## [◆ ](#abf66400947187c9d1488661356df12f4)isCancelled()

 virtual bool isCancelled  ( )   pure virtual 

Returns the cancel state of the instance. The cancel state is false as long as no call to the cancel function took place.

ReturnsFalse iff cancel was never called. Implemented in [SimpleCancel](class_simple_cancel.xhtml#a0d78ccfebb4ea3e786be49370876f85a).