Class to store information about warnings in a thread-safe manner (deriving from ILockable
). All function calls are thread-safe.
More...
#include <Util.h>
|
struct | WarningData |
| Data associated with a warning. The class is convertible to bool (true if it describes an error/warning, false otherwise). More...
|
|
|
std::unique_ptr< WarningData > | Data |
| Pointer to warning data. Must never be nullptr.
|
|
Class to store information about warnings in a thread-safe manner (deriving from ILockable
). All function calls are thread-safe.
Definition at line 965 of file Util.h.
◆ Warning() [1/4]
Util::Warning::Warning |
( |
| ) |
|
|
inline |
◆ Warning() [2/4]
Util::Warning::Warning |
( |
std::string |
Description, |
|
|
const int |
ErrorCode = DynExpErrorCodes::GeneralError , |
|
|
const std::source_location |
Location = std::source_location::current() |
|
) |
| |
|
inline |
Constructs a Warning from specified information.
- Parameters
-
Description | String describing the reason and consequences of the warning |
ErrorCode | DynExp error code from DynExpErrorCodes::DynExpErrorCodes |
Location | Origin of the warning. Do not pass anything except when deriving from this class. |
Definition at line 1008 of file Util.h.
◆ Warning() [3/4]
Util::Warning::Warning |
( |
const Exception & |
e | ) |
|
|
inline |
Constructs a Warning retrieving the warning data from an exception e
.
- Parameters
-
Definition at line 1016 of file Util.h.
◆ Warning() [4/4]
Util::Warning::Warning |
( |
Warning && |
Other | ) |
|
|
noexcept |
Constructs a Warning moving Other's
warning data to this instance clearing Other's
warning data.
- Parameters
-
Definition at line 266 of file Util.cpp.
◆ ~Warning()
virtual Util::Warning::~Warning |
( |
| ) |
|
|
virtualdefault |
◆ Get()
Returns a copy of the warning data.
Definition at line 297 of file Util.cpp.
◆ operator=() [1/2]
Retrives the warning data from an exception e
derived from Exception.
Definition at line 280 of file Util.cpp.
◆ operator=() [2/2]
Swaps in the warning data of this instance with Other's
warning data.
Definition at line 288 of file Util.cpp.
◆ Reset()
void Util::Warning::Reset |
( |
| ) |
|
Clears the warning data.
Definition at line 273 of file Util.cpp.
◆ Data
Pointer to warning data. Must never be nullptr.
Definition at line 1038 of file Util.h.
The documentation for this class was generated from the following files: