DynExp
Highly flexible laboratory automation for dynamically changing experiments.
Util::Warning::WarningData Struct Reference

Data associated with a warning. The class is convertible to bool (true if it describes an error/warning, false otherwise). More...

Public Member Functions

 WarningData ()
 Default constructor sets ErrorCode to a non-error code. More...
 
 WarningData (std::string Description, const int ErrorCode=DynExpErrorCodes::GeneralError, const std::source_location Location=std::source_location::current())
 
 WarningData (std::string Description, const int ErrorCode=DynExpErrorCodes::GeneralError, const size_t Line=0, std::string Function="", std::string File="")
 
 operator bool () const noexcept
 

Public Attributes

const std::string Description
 String describing the reason and consequences of the warning. More...
 
const int ErrorCode
 DynExp error code from DynExpErrorCodes::DynExpErrorCodes More...
 
const size_t Line
 Line in source code where the warning occurred. More...
 
const std::string Function
 Function in source code where the warning occurred. More...
 
const std::string File
 Source code file where the warning occurred. More...
 

Detailed Description

Data associated with a warning. The class is convertible to bool (true if it describes an error/warning, false otherwise).

Definition at line 972 of file Util.h.

Constructor & Destructor Documentation

◆ WarningData() [1/3]

Util::Warning::WarningData::WarningData ( )
inline

Default constructor sets ErrorCode to a non-error code.

Definition at line 977 of file Util.h.

◆ WarningData() [2/3]

Util::Warning::WarningData::WarningData ( std::string  Description,
const int  ErrorCode = DynExpErrorCodes::GeneralError,
const std::source_location  Location = std::source_location::current() 
)
inline

Definition at line 979 of file Util.h.

◆ WarningData() [3/3]

Util::Warning::WarningData::WarningData ( std::string  Description,
const int  ErrorCode = DynExpErrorCodes::GeneralError,
const size_t  Line = 0,
std::string  Function = "",
std::string  File = "" 
)
inline

Definition at line 983 of file Util.h.

Member Function Documentation

◆ operator bool()

Util::Warning::WarningData::operator bool ( ) const
inlineexplicitnoexcept

Definition at line 988 of file Util.h.

Member Data Documentation

◆ Description

const std::string Util::Warning::WarningData::Description

String describing the reason and consequences of the warning.

Definition at line 990 of file Util.h.

◆ ErrorCode

const int Util::Warning::WarningData::ErrorCode

DynExp error code from DynExpErrorCodes::DynExpErrorCodes

Definition at line 991 of file Util.h.

◆ File

const std::string Util::Warning::WarningData::File

Source code file where the warning occurred.

Definition at line 994 of file Util.h.

◆ Function

const std::string Util::Warning::WarningData::Function

Function in source code where the warning occurred.

Definition at line 993 of file Util.h.

◆ Line

const size_t Util::Warning::WarningData::Line

Line in source code where the warning occurred.

Definition at line 992 of file Util.h.


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