16 #ifndef A_UTIL_UTIL_RESULT_DETAIL_DESCRIPTION_DECL_HEADER_INCLUDED
17 #define A_UTIL_UTIL_RESULT_DETAIL_DESCRIPTION_DECL_HEADER_INCLUDED
31 template <
typename DescriptionIntf >
87 std::uint64_t error_code) noexcept;
110 template <
typename DescriptionIntf >
167 template <
typename DescriptionImpl,
typename... Args>
178 template <
typename T>
180 const ::a_util::result::ResultInfo<T>& result_info) noexcept;
209 std::uint64_t _pointer_to_result_or_error_code;
233 template <
typename T>
243 template <
typename T>
An internal stable interface to ensure binary compatibility of reference counting.
Wrapper for either a pointer to a detailed description object or simply a numeric error code.
ResultDescriptionTraits< DescriptionIntf > TraitsType
Traits type abbreviation.
ResultDescription & operator=(const ResultDescription &other)
Copy assignment operator.
std::int32_t getErrorCode() const
Get the error code if only the error code was set.
DescriptionIntf const * getDetailedDescription() const
Get the detailed description if any was allocated.
~ResultDescription()
DTOR.
static SelfType makeResultDescription(std::int32_t error_code, Args &&... args)
Allocate an object being able to store detailed error information.
ResultDescription< DescriptionIntf > SelfType
Self type.
bool operator==(const ResultDescription< T > &lhs, const ResultDescription< T > &rhs)
Compare two result description objects for equality.
bool operator!=(const ResultDescription< T > &lhs, const ResultDescription< T > &rhs)
Compare two result description objects for inequality.
Serves as the root component, with common functionality documented in core functionality.
Private implementation for ResultDescription type and functions.
Public API for ResultInfo type, functions and macros.
Traits type for the result description.
ResultDescriptionTraits()=delete
Must not be constructed/copied/moved.
constexpr static const ReferenceCountedDescriptionType * toInternalErrorPointer(std::uint64_t error_code) noexcept
Get the internal error pointer representation from the internal error code representation.
ReferenceCountedObjectInterface< DescriptionIntf > ReferenceCountedDescriptionType
Reference counted error description type.
static bool isDetailedDescriptionSet(std::uint64_t value)
Check whether the detailed description was allocated.
static const std::uint64_t error_code_bit
The error code bit indicating whether only the error code (1) was set or not (0)
constexpr static std::int32_t toExternalErrorCode(std::uint64_t error_code) noexcept
Get the external error code from the internal error code representation.
static const std::uint64_t error_code_bitmask
The error code bitmask to mask out the error code bit.
~ResultDescriptionTraits()
To implement various static checks.
static const std::uint64_t error_code_deserialize_bitmask
The bitmask to deserialize the internal error representation to its original value.
constexpr static std::uint64_t toInternalErrorCode(std::int32_t error_code) noexcept
Get the internal error code representation from the external error code.
static const std::uint64_t error_code_serialize_bitmask
The bitmask to serialize the error code to its internal representation.
static bool isErrorCodeSet(std::uint64_t value)
Check whether only the error code was set.
Private API for ReferenceCountedObjectInterface type.