ADTF  3.18.2
workspace/conan/dev_essential/1.3.3/dw/stable/package/37682420cd166e229516a41c8d6a139a0b13e1e1/include/a_util/result/result_util.h
Go to the documentation of this file.
1 
15 #ifndef A_UTIL_UTIL_RESULT_RESULT_UTIL_HEADER_INCLUDED
16 #define A_UTIL_UTIL_RESULT_RESULT_UTIL_HEADER_INCLUDED
17 
18 #include <string>
19 
20 namespace a_util {
21 namespace result {
22 // forward declarations
23 class Result;
24 
29  DisableNone = 0x00,
30  DisableCode = 0x01,
31  DisableName = 0x02,
32  DisableMessage = 0x04,
33  DisableFile = 0x08,
34  DisableLine = 0x10,
35  DisableFunction = 0x20
36 }; // enum ResultFormatFlags
37 
47 std::string toString(const Result& result,
48  ResultFormatFlags formatting_flags = DisableNone,
49  const char* format = nullptr);
50 
51 } // namespace result
52 } // namespace a_util
53 
54 #endif // A_UTIL_UTIL_RESULT_RESULT_UTIL_HEADER_INCLUDED
A common result class usable as return value throughout.
std::string toString(const Result &result, ResultFormatFlags formatting_flags=DisableNone, const char *format=nullptr)
Copy all information of an assigned result object to a (formatted) string.
std::string format(const char *str_format,...)
printf()-like formatting of an input string.
Serves as the root component, with common functionality documented in core functionality.
Definition: base.h:24