|
Phosphor
|
#include <trace_argument.h>
Public Types | |
| enum | Type : char { is_bool, is_uint, is_int, is_double, is_pointer, is_string, is_istring, is_none } |
Public Member Functions | |
| TraceArgument ()=default | |
| template<class T > | |
| constexpr | TraceArgument (T src) |
| std::string | to_string (TraceArgument::Type type) const |
Public Attributes | |
| bool | as_bool |
| unsigned long long | as_uint |
| long long | as_int |
| double | as_double |
| const char * | as_string |
| const void * | as_pointer |
| inline_zstring< 8 > | as_istring |
| NoneType | as_none |
A union which represents a single trace argument.
Has various methods / constructors for tidily creating and printing the TraceArgument.
|
strong |
Enumeration of the possible types of a TraceArgument
|
default |
Default constructor
|
inline |
Templated conversion constructor
| src | Value to be converted to a TraceArgument |
Usage:
TraceArgument trace_arg = TraceArgument(arg);
Where arg is one of many primitive types, e.g. int.
|
inline |
Converts the TraceArgument to string
| type | The enum which describes the type of the TraceArgument |