#include "Core.h"
#include <format>
#include <source_location>
Go to the source code of this file.
|
| using | JPL::TraceFunction = void (*)(const char* message) |
| | Trace function, needs to be overridden by application. This should output a line of text to the log / TTY.
|
| |
| using | JPL::AssertFailedFunction = bool(*)(const char* inExpression, const char* inMessage, const std::source_location) |
| | Function called when an assertion fails. This function should return true if a breakpoint needs to be triggered.
|
| |
◆ JPL_ASSERT
| #define JPL_ASSERT |
( |
| inExpression, |
|
|
| ... ) |
◆ JPL_ENABLE_ASSERTS
| #define JPL_ENABLE_ASSERTS |
◆ JPL_ENABLE_ENSURE
| #define JPL_ENABLE_ENSURE |
◆ JPL_ENSURE
| #define JPL_ENSURE |
( |
| inExpression, |
|
|
| ... ) |
Value:[&]{
if(!(inExpression) &&
::JPL::AssertFailedParamHelper(#inExpression, std::source_location::current(), ##__VA_ARGS__)) { JPL_BREAKPOINT; }
return (inExpression); }()
Define ENSURE.
◆ JPL_ERROR_REPORTING_DEFINED
| #define JPL_ERROR_REPORTING_DEFINED |
◆ JPL_ERROR_TAG
| #define JPL_ERROR_TAG |
( |
| tag, |
|
|
| message ) |
Value:SpatialTrace(std::format("[{}]: Error: {}", tag, message).c_str())
◆ JPL_IF_ENABLE_ASSERTS
| #define JPL_IF_ENABLE_ASSERTS |
( |
| ... | ) |
|
◆ JPL_INFO_TAG
| #define JPL_INFO_TAG |
( |
| tag, |
|
|
| message ) |
Value:SpatialTrace(std::format("[{}]: Info: {}", tag, message).c_str())
◆ JPL_TRACE_TAG
| #define JPL_TRACE_TAG |
( |
| tag, |
|
|
| message ) |
Value:SpatialTrace(std::format("[{}]: Trace: {}", tag, message).c_str())
◆ JPL_WARN_TAG
| #define JPL_WARN_TAG |
( |
| tag, |
|
|
| message ) |
Value:SpatialTrace(std::format("[{}]: Warning: {}", tag, message).c_str())