![]() |
RMVL
2.5.0-dev
Robotic Manipulation and Vision Library
|
提供异常处理、定时器、编程工具和 YAML 数据读写等基础功能 更多...
专题 | |
| Python 风格的字符串处理 | |
| 提供 split、strip、join 等字符串处理函数 | |
| 定时、计时模块 | |
| 提供 Epoch 时间获取和代码执行时间测量功能 | |
| 聚合体编译期反射 | |
| 提供聚合体成员数量获取、遍历和比较功能 | |
| 元编程 | |
| 提供哈希生成相关的 Type Traits | |
| YAML 解析模块 | |
| 提供基于 rapidyaml 的高性能 YAML 解析、树访问、类型转换和文件读写功能 | |
命名空间 | |
| namespace | rm::reflect::helper |
类 | |
| class | rm::Exception |
| 该类封装了有关程序中发生的错误的所有或几乎所有必要信息。异常通常是通过 RMVL_Error 和 RMVL_Error_ 宏隐式构造和抛出的 更多... | |
宏定义 | |
| #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 () |
| 返回完整的配置输出 | |
| std::size_t | rm::hash_aggregate< Tp, Enable >::operator() (const Tp &r) const |
| uint32_t | rm::processId () |
| 获取当前进程的 ID | |
提供异常处理、定时器、编程工具和 YAML 数据读写等基础功能
| #define DEBUG_ERROR_ | ( | ... | ) |
| #define DEBUG_HIGHLIGHT_ | ( | ... | ) |
#include <rmvl/core/util.hpp>
| #define DEBUG_INFO_ | ( | ... | ) |
| #define DEBUG_PASS_ | ( | ... | ) |
| #define DEBUG_WARNING_ | ( | ... | ) |
| #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>
调用错误处理程序
| [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>
| using rm::hash_traits< Tp, std::enable_if_t< std::is_aggregate_v< Tp > > >::hash_func = hash_aggregate<Tp> |
| using rm::hash_traits< Tp, std::enable_if_t<!std::is_aggregate_v< Tp > > >::hash_func = std::hash<Tp> |
| enum RMVLErrorCode : int |
#include <rmvl/core/util.hpp>
RMVL 错误码
|
inline |
#include <rmvl/core/util.hpp>
触发非法内存操作
| 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 | 源文件中发生错误的行号 |
| std::string rm::format | ( | const char * | fmt, |
| ... ) |
#include <rmvl/core/util.hpp>
返回使用类 printf 表达式格式化的文本字符串。
| [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>
返回完整的配置输出
| 配置、构建信息字符串 |
|
inline |
#include <rmvl/core/util.hpp>
| uint32_t rm::processId | ( | ) |
#include <rmvl/core/util.hpp>
获取当前进程的 ID
|
inline |
#include <rmvl/core/util.hpp>
抛出异常