3#include "PhysXDefines.h"
12 constexpr static uint16_t bufsize = 512;
14 static void LogHelper(
FILE* output,
const std::string_view,
const char* type);
16 static void InvokeUserHandler(
const std::string_view msg);
24 static inline void LogTemp(
const std::string_view message){
26 LogHelper(stdout, message,
"LOGTEMP");
35 template <
typename ... T>
38 LogHelper(stdout, Format(
formatstr,values...),
"LOGTEMP");
46 static inline void Log(
const std::string_view message){
47 LogHelper(stdout, message,
"LOG");
55 template <
typename ... T>
56 static constexpr inline void Log(
const std::string_view
formatstr, T&& ... values){
57 LogHelper(stdout, VFormat(
formatstr, values...),
"LOG");
64 static inline void Warning(
const char* message){
65 LogHelper(stderr, message,
"WARN");
73 template <
typename ... T>
75 LogHelper(stderr, VFormat(
formatstr, values...),
"WARN");
78 static inline void PrintStacktraceHere(){
86 static inline void Error(
const std::string_view message){
87 LogHelper(stderr, message,
"ERROR");
88 PrintStacktraceHere();
96 template <
typename ... T>
98 LogHelper(stderr, VFormat(
formatstr, values...),
"ERROR");
99 PrintStacktraceHere();
106 static inline void Fatal(
const std::string_view message){
108 InvokeUserHandler(message);
109 throw std::runtime_error(std::string(message));
117 template <
typename ... T>
131 template <
typename ... T>
152 template<
typename U,
typename T>
154 Debug::Assert(val <= std::numeric_limits<U>::max(),
"Size ({}) is greater than maximum allowed ({})",val, std::numeric_limits<U>::max());
155 return static_cast<U
>(val);
static void Assert(bool condition, const char *formatstr, T &&... values)
Definition Debug.hpp:132
static constexpr void Log(const std::string_view formatstr, T &&... values)
Definition Debug.hpp:56
static void Fatal(const std::string_view message)
Definition Debug.hpp:106
static void Error(const std::string_view formatstr, T &&... values)
Definition Debug.hpp:97
static void Warning(const std::string_view formatstr, T &&... values)
Definition Debug.hpp:74
static void LogTemp(const std::string_view message)
Definition Debug.hpp:24
static void Warning(const char *message)
Definition Debug.hpp:64
static void LogTemp(const std::string_view formatstr, T &&... values)
Definition Debug.hpp:36
static void Assert(bool condition, const char *msg)
Definition Debug.hpp:143
static void Log(const std::string_view message)
Definition Debug.hpp:46
static void Fatal(const std::string_view formatstr, T &&... values)
Definition Debug.hpp:118
static void Error(const std::string_view message)
Definition Debug.hpp:86
static U AssertSize(T val, const char *name="")
Definition Debug.hpp:153
Definition SpinLock.hpp:9
Definition concurrentqueue.h:747
Definition Animation.hpp:6