Phosphor
trace_argument.h File Reference
#include <cstddef>
#include <sstream>
#include <stdexcept>
#include <string>
#include <type_traits>
#include "inline_zstring.h"
#include "platform/core.h"

Go to the source code of this file.

Classes

struct  phosphor::NoneType
 
union  phosphor::TraceArgument
 
class  phosphor::TraceArgumentConversion< T >
 
class  phosphor::TraceArgumentConversion< T * >
 

Macros

#define ARGUMENT_CONVERSION(src, dst)
 

Detailed Description

This file is internal to the inner workings of Phosphor and is not intended for public consumption.

Macro Definition Documentation

#define ARGUMENT_CONVERSION (   src,
  dst 
)
Value:
template <> \
inline constexpr TraceArgument::TraceArgument(src arg) : as_##dst(arg) {} \
template<> \
class TraceArgumentConversion<src> { \
public:\
inline static constexpr TraceArgument::Type getType() { \
return TraceArgument::Type::is_##dst; \
} \
\
inline static constexpr TraceArgument asArgument(src arg) { \
return TraceArgument(arg); \
} \
};
Type
Definition: trace_argument.h:51

Used for defining the constructor and type-to-enum constexpr for a given type.

Parameters
srcThe origin type of the argument
dstThe destination 'type' (aka the appropriate is_/as_ suffix) of the argument.