|
ADTF
|
Serves as component for functionality handling error and return types. More...
Namespaces | |
| namespace | detail |
| Serves as namespace for result implementation details. | |
Classes | |
| class | Result |
| struct | ResultInfo |
| struct | ResultInfo< void > |
Enumerations | |
| enum | ResultFormatFlags { DisableNone = 0x00 , DisableCode = 0x01 , DisableName = 0x02 , DisableMessage = 0x04 , DisableFile = 0x08 , DisableLine = 0x10 , DisableFunction = 0x20 } |
Functions | |
| template<typename ResultType> | |
| bool | isOk (const ResultType &result) |
| template<typename ResultType> | |
| bool | isFailed (const ResultType &result) |
| template<typename ResultTypeLHS, typename ResultTypeRHS> | |
| bool | operator== (const ResultInfo< ResultTypeLHS > &lhs, const ResultInfo< ResultTypeRHS > &rhs) |
| template<typename ResultTypeLHS, typename ResultTypeRHS> | |
| bool | operator!= (const ResultInfo< ResultTypeLHS > &lhs, const ResultInfo< ResultTypeRHS > &rhs) |
| template<typename ResultTypeLHS, typename ResultTypeRHS> | |
| bool | operator< (const ResultInfo< ResultTypeLHS > &lhs, const ResultInfo< ResultTypeRHS > &rhs) |
| template<typename ResultTypeLHS, typename ResultTypeRHS> | |
| bool | operator> (const ResultInfo< ResultTypeLHS > &lhs, const ResultInfo< ResultTypeRHS > &rhs) |
| template<typename ResultTypeLHS, typename ResultTypeRHS> | |
| bool | operator<= (const ResultInfo< ResultTypeLHS > &lhs, const ResultInfo< ResultTypeRHS > &rhs) |
| template<typename ResultTypeLHS, typename ResultTypeRHS> | |
| bool | operator>= (const ResultInfo< ResultTypeLHS > &lhs, const ResultInfo< ResultTypeRHS > &rhs) |
| bool | operator== (const Result &lhs, const Result &rhs) |
| bool | operator!= (const Result &lhs, const Result &rhs) |
| template<typename T> | |
| bool | operator== (const Result &result, const ResultInfo< T > &) |
| template<typename T> | |
| bool | operator!= (const Result &result, const ResultInfo< T > &error_code) |
| template<typename T> | |
| bool | operator== (const ResultInfo< T > &error_code, const Result &result) |
| template<typename T> | |
| bool | operator!= (const ResultInfo< T > &error_code, const Result &result) |
| void | swap (Result &lhs, Result &rhs) |
| template<> | |
| bool | isOk< Result > (const Result &result) |
| template<> | |
| bool | isOk< Result > (const Result &result) |
| std::string | toString (const Result &result, ResultFormatFlags formatting_flags=DisableNone, const char *format=nullptr) |
Serves as component for functionality handling error and return types.
Define flags
|
inline |
Check whether a return value indicates an unsuccessful function execution
| ResultType | Type of the result value |
| [in] | result | Value of the result type |
true if result indicates failure, false otherwise.
|
inline |
Check whether a return value indicates a successful function execution
| ResultType | Type of the result value |
| [in] | result | Value of the result type |
true if result indicates success, false otherwise.
|
inline |
Specialization of a_util::result::isOk<typename ResultType>() for correct lookup
| [in] | result | Result instance to check for error |
true, otherwise false
|
inline |
Specialization of a_util::result::isOk<typename ResultType>() for correct lookup
| [in] | result | Result instance to check for error |
true, otherwise false Negated comparison operator (shallow comparison)
| [in,out] | lhs | Left hand side result object. |
| [in,out] | rhs | Right hand side result object. |
true if both result objects do not match, false otherwise.
|
inline |
Comparison operator (inequality) for objects of type Result and ResultInfo
| T | Error code type handled by ResultInfo<> |
| [in] | result | Left hand side result object |
| [in] | error_code | Right hand side error object |
true if both objects contain different error codes, false otherwise
|
inline |
Compare two specialized result information objects for inequality
| ResultTypeLHS | Left hand side result type |
| ResultTypeRHS | Right hand side result type |
| [in] | lhs | Left hand side result information |
| [in] | rhs | Right hand side result information |
false if rhs and lhs are equal, true otherwise.
|
inline |
Comparison operator (inequality) for objects of type Result and ResultInfo
| T | Error code type handled by ResultInfo<> |
| [in] | error_code | Left hand side error object |
| [in] | result | Right hand side result object |
true if both objects contain different error codes, false otherwise
|
inline |
Less-than operator for two specialized result information objects
| ResultTypeLHS | Left hand side result type |
| ResultTypeRHS | Right hand side result type |
| [in] | lhs | Left hand side result information |
| [in] | rhs | Right hand side result information |
true if lhs is less than rhs, false otherwise.
|
inline |
Less-than-or-equal operator for two specialized result information objects
| ResultTypeLHS | Left hand side result type |
| ResultTypeRHS | Right hand side result type |
| [in] | lhs | Left hand side result information |
| [in] | rhs | Right hand side result information |
true if lhs is less than or equal rhs, false otherwise. Comparison operator (shallow comparison)
| [in,out] | lhs | Left hand side result object. |
| [in,out] | rhs | Right hand side result object. |
true if both result objects match, false otherwise.
|
inline |
Comparison operator (equality) for objects of type Result and ResultInfo
| T | Error code type handled by ResultInfo<> |
| [in] | result | Left hand side result object |
| [in] | error_code | Right hand side error object |
true if both objects contain the same error code, false otherwise
|
inline |
Compare two specialized result information objects for equality
| ResultTypeLHS | Left hand side result type |
| ResultTypeRHS | Right hand side result type |
| [in] | lhs | Left hand side result information |
| [in] | rhs | Right hand side result information |
true if rhs and lhs are equal, false otherwise.
|
inline |
Comparison operator (equality) for objects of type Result and ResultInfo
| T | Error code type handled by ResultInfo<> |
| [in] | error_code | Left hand side error object |
| [in] | result | Right hand side result object |
true if both objects contain the same error code, false otherwise
|
inline |
Greater-than operator for two specialized result information objects
| ResultTypeLHS | Left hand side result type |
| ResultTypeRHS | Right hand side result type |
| [in] | lhs | Left hand side result information |
| [in] | rhs | Right hand side result information |
false if lhs is less than or equal rhs, true otherwise.
|
inline |
Greater-than-or-equal operator for two specialized result information objects
| ResultTypeLHS | Left hand side result type |
| ResultTypeRHS | Right hand side result type |
| [in] | lhs | Left hand side result information |
| [in] | rhs | Right hand side result information |
false if lhs is less than rhs, true otherwise. Specialized friend swap function to enable ADL in std::swap later.
| [in,out] | lhs | Left hand side result object. |
| [in,out] | rhs | Right hand side result object. |
| std::string a_util::result::toString | ( | const Result & | result, |
| ResultFormatFlags | formatting_flags = DisableNone, | ||
| const char * | format = nullptr ) |
Copy all information of an assigned result object to a (formatted) string
| [in] | result | The result instance getting stringified |
| [in] | formatting_flags | Flags to disable stringification of specific information offered by Result |
| [in] | format | Optional format specifier - if left empty, the default format is used. Currently not implemented. |