![]() |
RMVL
2.1.1
Robotic Manipulation and Vision Library
|
专题 | |
| 数据 IO 与通信 | |
| 定时、计时模块 | |
类 | |
| class | rm::Exception |
| 该类封装了有关程序中发生的错误的所有或几乎所有必要信息。异常通常是通过 RMVL_Error 和 RMVL_Error_ 宏隐式构造和抛出的 更多... | |
| struct | rm::hash_aggregate< Tp, Enable > |
| 专为聚合类添加的 hash 生成可调用对象 更多... | |
| struct | rm::hash_traits< Tp, Enable > |
| 哈希生成函数类型 traits 更多... | |
| struct | rm::hash_traits< Tp, std::enable_if_t<!std::is_aggregate_v< Tp > > > |
| 非聚合类哈希生成函数类型 traits 更多... | |
| struct | rm::hash_traits< Tp, std::enable_if_t< std::is_aggregate_v< Tp > > > |
| 聚合类哈希生成函数类型 traits 更多... | |
宏定义 | |
| #define | HIGHLIGHT_(...) |
| #define | WARNING_(...) |
| #define | PASS_(...) |
| #define | ERROR_(...) |
| #define | INFO_(...) |
| #define | DEBUG_WARNING_(...) |
| #define | DEBUG_ERROR_(...) |
| #define | DEBUG_HIGHLIGHT_(...) |
| #define | DEBUG_INFO_(...) |
| #define | DEBUG_PASS_(...) |
| #define | RMVL_ERRHANDLE(...) |
| #define | RMVL_Error(code, msg) |
| 调用错误处理程序 | |
| #define | RMVL_Error_(code, fmt, ...) |
| 调用错误处理程序 | |
| #define | RMVL_Assert(expr) |
| 在运行时检查条件,如果失败则抛出异常 | |
| #define | RMVL_DbgAssert(expr) |
| 在 Debug 条件下或启用静态分析工具的情况下,在运行时检查条件,如果失败则抛出异常 | |
枚举 | |
| enum | RMVLErrorCode : int { RMVL_StsOk = 0 , RMVL_StsBackTrace = -1 , RMVL_StsError = -2 , RMVL_StsNoMem = -3 , RMVL_StsBadArg = -4 , RMVL_StsBadSize = -5 , RMVL_StsBadFunc = -6 , RMVL_StsNullPtr = -7 , RMVL_StsNotaNumber = -8 , RMVL_StsDivByZero = -9 , RMVL_StsOutOfRange = -10 , RMVL_StsAssert = -11 , RMVL_StsInvFmt = -12 , RMVL_BadDynamicType = -13 } |
| RMVL 错误码 更多... | |
函数 | |
| std::string | rm::format (const char *fmt,...) |
返回使用类 printf 表达式格式化的文本字符串。 | |
| void | rm::breakOnError () |
| 触发非法内存操作 | |
| void | rm::throwError (const Exception &exc) |
| 抛出异常 | |
| void | rm::error (int _code, std::string_view _err, const char *_func, const char *_file, int _line) |
| 发出错误信号并引发异常 | |
| const char * | rm::getBuildInformation () |
| 返回完整的配置输出 | |
| template<typename Tp > | |
| consteval std::size_t | rm::reflect::size (auto &&...args) |
| 获取指定类型的成员个数 | |
| template<typename Tp , typename Callable > | |
| void | rm::reflect::for_each (Tp &&val, Callable &&f) |
| 遍历聚合类的每一个数据成员 | |
| template<typename Tp > | |
| bool | rm::reflect::equal (const Tp &lhs, const Tp &rhs) |
| 判断两个聚合类数据是否相同 | |
| #define DEBUG_ERROR_ | ( | ... | ) |
#include <rmvl/core/util.hpp>
| #define DEBUG_HIGHLIGHT_ | ( | ... | ) |
#include <rmvl/core/util.hpp>
| #define DEBUG_INFO_ | ( | ... | ) |
#include <rmvl/core/util.hpp>
| #define DEBUG_PASS_ | ( | ... | ) |
#include <rmvl/core/util.hpp>
| #define DEBUG_WARNING_ | ( | ... | ) |
#include <rmvl/core/util.hpp>
| #define ERROR_ | ( | ... | ) |
#include <rmvl/core/util.hpp>
| #define HIGHLIGHT_ | ( | ... | ) |
#include <rmvl/core/util.hpp>
| #define INFO_ | ( | ... | ) |
#include <rmvl/core/util.hpp>
| #define PASS_ | ( | ... | ) |
#include <rmvl/core/util.hpp>
| #define RMVL_Assert | ( | expr | ) |
#include <rmvl/core/util.hpp>
在运行时检查条件,如果失败则抛出异常
| #define RMVL_DbgAssert | ( | expr | ) |
| #define RMVL_ERRHANDLE | ( | ... | ) |
#include <rmvl/core/util.hpp>
| #define RMVL_Error | ( | code, | |
| msg ) |
#include <rmvl/core/util.hpp>
调用错误处理程序
stderr。在 Debug 配置中,它会引发内存访问冲突,以便调试器可以分析执行堆栈和所有参数。在 Release 配置中,抛出异常。| [in] | code | 一种 RMVLErrorCode 错误码 |
| [in] | msg | 错误信息 |
| #define RMVL_Error_ | ( | code, | |
| fmt, | |||
| ... ) |
#include <rmvl/core/util.hpp>
调用错误处理程序
| [in] | code | 一种 RMVLErrorCode 错误码 |
| [in] | fmt | 格式化字符串 |
| [in] | ... | 括号中带有类似 printf 格式的错误信息 |
| #define WARNING_ | ( | ... | ) |
#include <rmvl/core/util.hpp>
| enum RMVLErrorCode : int |
#include <rmvl/core/util.hpp>
RMVL 错误码
|
inline |
|
inline |
#include <rmvl/core/util.hpp>
判断两个聚合类数据是否相同
12| Tp | 聚合类类型 |
| [in] | lhs | 左操作数 |
| [in] | rhs | 右操作数 |
| void rm::error | ( | int | _code, |
| std::string_view | _err, | ||
| const char * | _func, | ||
| const char * | _file, | ||
| int | _line ) |
#include <rmvl/core/util.hpp>
发出错误信号并引发异常
| [in] | _code | 错误码 |
| [in] | _err | 错误描述 |
| [in] | _func | 函数名,仅在编译器支持获取时可用 |
| [in] | _file | 发生错误的源文件名 |
| [in] | _line | 源文件中发生错误的行号 |
|
inline |
#include <rmvl/core/util.hpp>
遍历聚合类的每一个数据成员
12| Tp | 聚合类类型 |
| Callable | 可调用对象类型 |
| [in] | val | 聚合类对象 |
| [in] | f | 可调用对象 |
| std::string rm::format | ( | const char * | fmt, |
| ... ) |
#include <rmvl/core/util.hpp>
返回使用类 printf 表达式格式化的文本字符串。
sprintf,但形成并返回一个 STL 字符串。它可用于在 Exception 构造函数中形成错误消息。| [in] | fmt | 与 printf 兼容的格式化说明符。 |
| 类型 | 限定符 |
|---|---|
const char* | s |
char | c |
float or double | f,g |
int, long, long long | d, ld, `lld |
unsigned, unsigned long, unsigned long long | u, lu, llu |
uint64_t \(\to\) uintmax_t, int64_t \(\to\) intmax_t | ju, jd |
size_t | zu |
| const char * rm::getBuildInformation | ( | ) |
#include <rmvl/core/util.hpp>
返回完整的配置输出
| 配置、构建信息字符串 |
|
consteval |
|
inline |
#include <rmvl/core/util.hpp>
抛出异常
1.12.0