#include <resultbase.h>
Base class for Result.
Public Types | |
using | ValueType = T |
Public Member Functions | |
ResultBase () | |
ResultBase (CopyType value) | |
ResultBase (MoveType value) | |
MAXON_ATTRIBUTE_FORCE_INLINE const T & | GetValue () const & |
MAXON_ATTRIBUTE_FORCE_INLINE const T & | UncheckedGetValue () const & |
MAXON_MEMBER_ACCESSORS (T, GetValue) | |
MAXON_MEMBER_ACCESSORS (T, UncheckedGetValue) | |
MAXON_ATTRIBUTE_FORCE_INLINE const T & | GetValueAndError (ThreadReferencedError &error) const & |
MAXON_ATTRIBUTE_FORCE_INLINE T | GetValueAndError (ThreadReferencedError &error) && |
MAXON_ATTRIBUTE_FORCE_INLINE const T & | GetValueAndError (Error &error) const & |
MAXON_ATTRIBUTE_FORCE_INLINE T | GetValueAndError (Error &error) && |
MAXON_ATTRIBUTE_FORCE_INLINE const ThreadReferencedError & | GetErrorStorage () const |
MAXON_ATTRIBUTE_FORCE_INLINE ThreadReferencedError & | GetErrorStorage () |
Static Public Attributes | |
static constexpr Bool | HAS_ERROR |
Protected Types | |
using | CopyType = typename ByValueParam< T >::type |
using | MoveType = typename std::conditional< STD_IS_REPLACEMENT(reference, CopyType), T &&, DummyParamType & >::type |
using | DeleteType = const DummyParamType && |
template<typename T2 > | |
using | ConstructibleFrom = std::enable_if< STD_IS_REPLACEMENT(constructible, T, T2)> |
Protected Attributes | |
ThreadReferencedError | _error |
T | _value |
|
protected |
|
protected |
|
protected |
|
protected |
ResultBase | ( | ) |
|
explicit |
Constructs a new ResultBase with the given value and no error.
[in] | value | Result value. |
|
explicit |
Constructs a new ResultBase with the given value and no error.
[in] | value | Result value. |
MAXON_ATTRIBUTE_FORCE_INLINE const T& GetValue | ( | ) | const & |
Returns the result value. A DebugAssert will trigger if this is invoked when there is an error.
MAXON_ATTRIBUTE_FORCE_INLINE const T& UncheckedGetValue | ( | ) | const & |
Returns the result value. In case of an error there is no value, then this function returns a null value.
MAXON_MEMBER_ACCESSORS | ( | T | , |
GetValue | |||
) |
MAXON_MEMBER_ACCESSORS | ( | T | , |
UncheckedGetValue | |||
) |
MAXON_ATTRIBUTE_FORCE_INLINE const T& GetValueAndError | ( | ThreadReferencedError & | error | ) | const & |
MAXON_ATTRIBUTE_FORCE_INLINE T GetValueAndError | ( | ThreadReferencedError & | error | ) | && |
MAXON_ATTRIBUTE_FORCE_INLINE const T& GetValueAndError | ( | Error & | error | ) | const & |
MAXON_ATTRIBUTE_FORCE_INLINE T GetValueAndError | ( | Error & | error | ) | && |
MAXON_ATTRIBUTE_FORCE_INLINE const ThreadReferencedError& GetErrorStorage | ( | ) | const |
Returns a reference to the ThreadReferencedError storage in which the Result stores its error.
MAXON_ATTRIBUTE_FORCE_INLINE ThreadReferencedError& GetErrorStorage | ( | ) |
Returns a reference to the ThreadReferencedError storage in which the Result stores its error.
|
staticconstexpr |
|
protected |
|
protected |