DynExp
Highly flexible laboratory automation for dynamically changing experiments.
DynExp::TaskResultType Class Reference

Defines the return type of task functions. More...

Public Types

enum class  ContinueTaskHandlingType : bool { Continue , Terminate }
 Determines whether an instrument should terminate after handling the task. More...
 
enum class  AbortedType : bool { NotAborted , Aborted }
 Determines whether a task has been aborted. More...
 

Public Member Functions

constexpr TaskResultType (const ContinueTaskHandlingType ContinueTaskHandling=ContinueTaskHandlingType::Continue, const AbortedType Aborted=AbortedType::NotAborted, const int ErrorCode=0) noexcept
 Constructs a TaskResultType instance. More...
 
constexpr bool ShouldContinue () const noexcept
 Determines whether the instrument having handled this task should continue or terminate. More...
 
constexpr bool HasAborted () const noexcept
 Determines whether this task has been aborted. More...
 
constexpr int GetErrorCode () const noexcept
 Getter for the error code of an error which occurred during execution of the task function. More...
 

Private Attributes

const ContinueTaskHandlingType ContinueTaskHandling
 Determines whether an instrument should terminate after handling the task. More...
 
const AbortedType Aborted
 Determines whether a task has been aborted. More...
 
const int ErrorCode
 DynExp error code from DynExpErrorCodes::DynExpErrorCodes. Anything else than 0 indicates an error. More...
 

Detailed Description

Defines the return type of task functions.

Definition at line 823 of file Instrument.h.

Member Enumeration Documentation

◆ AbortedType

Determines whether a task has been aborted.

Enumerator
NotAborted 

The task has not been aborted.

Aborted 

Definition at line 842 of file Instrument.h.

◆ ContinueTaskHandlingType

Determines whether an instrument should terminate after handling the task.

Enumerator
Continue 

Task handling should continue, the instrument does not terminate.

Terminate 

Task handling should not continue, the instrument should terminate.

Definition at line 829 of file Instrument.h.

Constructor & Destructor Documentation

◆ TaskResultType()

constexpr DynExp::TaskResultType::TaskResultType ( const ContinueTaskHandlingType  ContinueTaskHandling = ContinueTaskHandlingType::Continue,
const AbortedType  Aborted = AbortedType::NotAborted,
const int  ErrorCode = 0 
)
inlineconstexprnoexcept

Constructs a TaskResultType instance.

Parameters
ContinueTaskHandlingDetermines whether an instrument should terminate after handling the task.
AbortedDetermines whether a task has been aborted.
ErrorCodeDynExp error code from DynExpErrorCodes::DynExpErrorCodes. Anything else than 0 indicates an error.

Definition at line 858 of file Instrument.h.

Member Function Documentation

◆ GetErrorCode()

constexpr int DynExp::TaskResultType::GetErrorCode ( ) const
inlineconstexprnoexcept

Getter for the error code of an error which occurred during execution of the task function.

Returns
Returns ErrorCode.

Definition at line 878 of file Instrument.h.

◆ HasAborted()

constexpr bool DynExp::TaskResultType::HasAborted ( ) const
inlineconstexprnoexcept

Determines whether this task has been aborted.

Returns
Returns true if the task has been aborted, false otherwise.

Definition at line 872 of file Instrument.h.

◆ ShouldContinue()

constexpr bool DynExp::TaskResultType::ShouldContinue ( ) const
inlineconstexprnoexcept

Determines whether the instrument having handled this task should continue or terminate.

Returns
Returns true if the instrument should continue handling other tasks or false if the instrument should terminate.

Definition at line 866 of file Instrument.h.

Member Data Documentation

◆ Aborted

TaskResultType::AbortedType DynExp::TaskResultType::Aborted
private

Determines whether a task has been aborted.

The task has been aborted.

Definition at line 882 of file Instrument.h.

◆ ContinueTaskHandling

const ContinueTaskHandlingType DynExp::TaskResultType::ContinueTaskHandling
private

Determines whether an instrument should terminate after handling the task.

Definition at line 881 of file Instrument.h.

◆ ErrorCode

const int DynExp::TaskResultType::ErrorCode
private

DynExp error code from DynExpErrorCodes::DynExpErrorCodes. Anything else than 0 indicates an error.

Definition at line 883 of file Instrument.h.


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