ADTF
|
64 Bit error type has max 63 Bit large pointer type member variable More...
#include <result_description.h>
Public Types | |
using | self_type = result_description<DescriptionType> |
Self type. | |
using | desc_type = DescriptionType |
Description type. | |
using | traits_type = result_description_traits<DescriptionType> |
Traits type abbreviation. | |
Public Member Functions | |
constexpr | result_description (result_description &&oOther) noexcept |
result_description (const result_description &oOther) noexcept | |
result_description & | operator= (const result_description &oOther) noexcept |
desc_type const * | get_detailed_description () const noexcept |
Get the detailed description if any was allocated. | |
constexpr tErrorCode | get_error_code () const noexcept |
Get the error code if only the error code was set. | |
Static Public Member Functions | |
template<typename Implementation, typename... Args> | |
static self_type | make_result_description (const tErrorCode &i_oErrorCode, Args &&... args) noexcept |
Allocate an object being able to store detailed error information. | |
static constexpr self_type | make_result_description (const tErrorCode &i_oErrorCode) noexcept |
Make the result description object only with an error code. | |
Private Member Functions | |
constexpr | result_description (std::uint64_t nErrorCode) noexcept |
Private Attributes | |
std::uint64_t | m_pDetailedResult |
64 Bit error type has max 63 Bit large pointer type member variable
[1|...|______________________up_to_63_____________________________] [a| b | c ] Regions:
a:
Error code Bit - Indicates whether only the error code in region b was set (1 == yes, 0 == no) b:
padding data with unused pointer bits c:
up to 63 Bits - Either only the error code value or the pointer to the allocated error description (might be nil)DescriptionType | The detailed description type which might be used to allocate space for detailed error information. |
Definition at line 80 of file result_description.h.
using desc_type = DescriptionType |
Description type.
Definition at line 83 of file result_description.h.
using self_type = result_description<DescriptionType> |
Self type.
Definition at line 82 of file result_description.h.
using traits_type = result_description_traits<DescriptionType> |
Traits type abbreviation.
Definition at line 84 of file result_description.h.
|
inlineconstexprnoexcept |
Definition at line 86 of file result_description.h.
|
inlineconstexprnoexcept |
Definition at line 89 of file result_description.h.
|
inlinenoexcept |
Definition at line 94 of file result_description.h.
|
inlinenoexcept |
Definition at line 119 of file result_description.h.
|
inlineconstexprprivatenoexcept |
Definition at line 205 of file result_description.h.
|
inlinenoexcept |
Get the detailed description if any was allocated.
nullptr
if none was allocated Definition at line 169 of file result_description.h.
|
inlineconstexprnoexcept |
Get the error code if only the error code was set.
Definition at line 185 of file result_description.h.
|
inlinestaticconstexprnoexcept |
Make the result description object only with an error code.
[in] | i_oErrorCode | The error code to set |
result_description
Definition at line 156 of file result_description.h.
|
staticnoexcept |
Allocate an object being able to store detailed error information.
On common operating systems not the entire 64Bits of a pointer are used to address virtual memory - so there are some spare bits free to be used as user space. However, to safely mask out the appropriate bits, it is checked whether the pointer to the allocated detailed description object indeed does not use the user space bits. If so, the detailed description will not be available and only the error code is set.
Implementation | The concrete implementation type to contain the detailed error description. The first constructor argument must be of type tErrorCode . |
Args | Constructor arguments for the allocation of type Implementation |
[in] | i_oErrorCode | The concrete error code either being used as first constructor argument for type Implementation or if allocation fails as the error code. |
[in] | args | The constructor arguments for the error description object. These usually include information like where did the error occur (line, file, ...) or the error string. |
result_description
|
inlinenoexcept |
Definition at line 99 of file result_description.h.
|
private |
Definition at line 203 of file result_description.h.