libxr
1.0
Want to be the best embedded framework
|
运行时错误检查的断言工具类。 Provides assertion mechanisms for runtime error checking. More...
#include <libxr_assert.hpp>
Public Types | |
using | Callback = LibXR::Callback<const char *, uint32_t> |
Static Public Member Functions | |
static void | RegisterFatalErrorCallback (const Callback &cb) |
注册致命错误的回调函数(左值引用版本)。 Register a fatal error callback (lvalue reference version). | |
static void | RegisterFatalErrorCallback (Callback &&cb) |
注册致命错误的回调函数(右值引用版本)。 Register a fatal error callback (rvalue reference version). | |
template<SizeLimitMode mode> | |
static void | SizeLimitCheck (size_t limit, size_t size) |
在非调试模式下的占位大小检查函数(无实际作用)。 Dummy size limit check for non-debug builds. | |
Static Public Attributes | |
static Callback | libxr_fatal_error_callback_ |
已注册的致命错误回调函数。 Registered fatal error callback. | |
运行时错误检查的断言工具类。 Provides assertion mechanisms for runtime error checking.
Assert
类提供了注册和处理致命错误的机制,支持回调函数,并可执行 运行时的大小限制检查(仅在调试模式下启用)。 The Assert
class is designed to register and handle fatal errors through callback functions and provides size limit verification.
Definition at line 38 of file libxr_assert.hpp.
using LibXR::Assert::Callback = LibXR::Callback<const char *, uint32_t> |
Definition at line 41 of file libxr_assert.hpp.
|
static |
注册致命错误的回调函数(右值引用版本)。 Register a fatal error callback (rvalue reference version).
cb | 要注册的回调函数(右值引用)。The callback function to register (rvalue reference). |
Definition at line 15 of file libxr_assert.cpp.
|
static |
注册致命错误的回调函数(左值引用版本)。 Register a fatal error callback (lvalue reference version).
cb | 要注册的回调函数(左值引用)。The callback function to register (lvalue reference). |
Definition at line 10 of file libxr_assert.cpp.
|
inlinestatic |
在非调试模式下的占位大小检查函数(无实际作用)。 Dummy size limit check for non-debug builds.
在发布模式下,该函数不会执行任何操作,以避免不必要的开销。 In release mode, this function does nothing to avoid unnecessary checks.
mode | 大小检查模式(EQUAL , MORE , LESS )。 The size constraint mode. |
limit | 参考限制值。 The reference limit value. |
size | 要检查的实际大小。 The actual size to be checked. |
Definition at line 109 of file libxr_assert.hpp.
|
inlinestatic |
已注册的致命错误回调函数。 Registered fatal error callback.
Definition at line 121 of file libxr_assert.hpp.