RMVL  2.5.0-dev
Robotic Manipulation and Vision Library
载入中...
搜索中...
未找到
YAML 解析模块

提供基于 rapidyaml 的高性能 YAML 解析、树访问、类型转换和文件读写功能 更多...

YAML 解析模块 的协作图:

struct  rm::yaml::Error
 YAML 操作错误 更多...
class  rm::yaml::Node
 YAML 树节点句柄 更多...
struct  rm::yaml::Result
 YAML 解析或加载结果 更多...

枚举

enum class  rm::yaml::NodeType : uint8_t {
  rm::yaml::NodeType::Undefined , rm::yaml::NodeType::Null , rm::yaml::NodeType::Scalar , rm::yaml::NodeType::Sequence ,
  rm::yaml::NodeType::Map
}
 YAML 节点类型 更多...
enum class  rm::yaml::ErrorCode : uint8_t { rm::yaml::ErrorCode::None , rm::yaml::ErrorCode::Parse , rm::yaml::ErrorCode::Io }
 YAML 操作错误类型 更多...

函数

Result rm::yaml::parse (std::string_view source)
 从内存解析 YAML
Result rm::yaml::load (std::string_view path)
 从文件加载 YAML
std::string rm::yaml::dump (const Node &node)
 将节点及其后代序列化为 YAML
bool rm::yaml::save (std::string_view path, const Node &node, Error &err)
 将节点保存为 YAML 文件并返回错误信息
bool rm::yaml::save (std::string_view path, const Node &node)
 将节点保存为 YAML 文件
std::string rm::yaml::dumpOpenCv (const Node &node)
 序列化为 OpenCV FileStorage 兼容的 YAML 文本
bool rm::yaml::saveOpenCv (std::string_view path, const Node &node)
 保存为 OpenCV FileStorage 兼容的 YAML 文件
template<typename T>
bool rm::yaml::yaml_decode (const Node &node, cv::Point_< T > &value)
template<typename T>
bool rm::yaml::yaml_encode (Node &node, const cv::Point_< T > &value)
template<typename T>
bool rm::yaml::yaml_decode (const Node &node, cv::Point3_< T > &value)
template<typename T>
bool rm::yaml::yaml_encode (Node &node, const cv::Point3_< T > &value)
template<typename T>
bool rm::yaml::yaml_decode (const Node &node, cv::Size_< T > &value)
template<typename T>
bool rm::yaml::yaml_encode (Node &node, const cv::Size_< T > &value)
template<typename T>
bool rm::yaml::yaml_decode (const Node &node, cv::Complex< T > &value)
template<typename T>
bool rm::yaml::yaml_encode (Node &node, const cv::Complex< T > &value)
template<typename T>
bool rm::yaml::yaml_decode (const Node &node, cv::Rect_< T > &value)
template<typename T>
bool rm::yaml::yaml_encode (Node &node, const cv::Rect_< T > &value)
template<typename T, int N>
bool rm::yaml::yaml_decode (const Node &node, cv::Vec< T, N > &value)
template<typename T, int N>
bool rm::yaml::yaml_encode (Node &node, const cv::Vec< T, N > &value)
template<typename T>
bool rm::yaml::yaml_decode (const Node &node, cv::Scalar_< T > &value)
template<typename T>
bool rm::yaml::yaml_encode (Node &node, const cv::Scalar_< T > &value)
bool rm::yaml::yaml_decode (const Node &node, cv::Range &value)
bool rm::yaml::yaml_encode (Node &node, const cv::Range &value)
bool rm::yaml::yaml_decode (const Node &node, cv::KeyPoint &value)
bool rm::yaml::yaml_encode (Node &node, const cv::KeyPoint &value)
bool rm::yaml::yaml_decode (const Node &node, cv::DMatch &value)
bool rm::yaml::yaml_encode (Node &node, const cv::DMatch &value)
bool rm::yaml::yaml_decode (const Node &node, cv::Mat &value)
bool rm::yaml::yaml_encode (Node &node, const cv::Mat &value)
template<typename T, int M, int N>
bool rm::yaml::yaml_decode (const Node &node, cv::Matx< T, M, N > &value)
template<typename T, int M, int N>
bool rm::yaml::yaml_encode (Node &node, const cv::Matx< T, M, N > &value)

详细描述

提供基于 rapidyaml 的高性能 YAML 解析、树访问、类型转换和文件读写功能

Node 是共享底层 YAML 树所有权的轻量句柄。子节点可安全脱离根节点保存,但同一棵树不提供内部线程同步。

枚举类型说明

◆ ErrorCode

enum class rm::yaml::ErrorCode : uint8_t
strong

#include <rmvl/core/yaml.hpp>

YAML 操作错误类型

枚举值
None 

无错误

Parse 

YAML 语法错误

Io 

文件读写错误

◆ NodeType

enum class rm::yaml::NodeType : uint8_t
strong

#include <rmvl/core/yaml.hpp>

YAML 节点类型

枚举值
Undefined 

无效或不存在的节点

Null 

空值

Scalar 

标量

Sequence 

序列

Map 

映射

函数说明

◆ dump()

std::string rm::yaml::dump ( const Node & node)

#include <rmvl/core/yaml.hpp>

将节点及其后代序列化为 YAML

参数
[in]node待序列化节点
返回
YAML 文本,节点无效时返回空字符串

◆ dumpOpenCv()

std::string rm::yaml::dumpOpenCv ( const Node & node)

#include <rmvl/core/yaml.hpp>

序列化为 OpenCV FileStorage 兼容的 YAML 文本

参数
[in]node待序列化节点
返回
带 OpenCV YAML 版本头的文本,节点无效时返回空字符串

◆ load()

Result rm::yaml::load ( std::string_view path)

#include <rmvl/core/yaml.hpp>

从文件加载 YAML

参数
[in]path文件路径
返回
加载与解析结果

◆ parse()

Result rm::yaml::parse ( std::string_view source)

#include <rmvl/core/yaml.hpp>

从内存解析 YAML

参数
[in]sourceYAML 文本
返回
解析结果

◆ save() [1/2]

bool rm::yaml::save ( std::string_view path,
const Node & node )
inline

#include <rmvl/core/yaml.hpp>

将节点保存为 YAML 文件

参数
[in]path文件路径
[in]node待保存节点
返回
是否保存成功
函数调用图:

◆ save() [2/2]

bool rm::yaml::save ( std::string_view path,
const Node & node,
Error & err )

#include <rmvl/core/yaml.hpp>

将节点保存为 YAML 文件并返回错误信息

参数
[in]path文件路径
[in]node待保存节点
[out]err错误信息,保存成功时重置为空错误
返回
是否保存成功

◆ saveOpenCv()

bool rm::yaml::saveOpenCv ( std::string_view path,
const Node & node )

#include <rmvl/core/yaml.hpp>

保存为 OpenCV FileStorage 兼容的 YAML 文件

参数
[in]path文件路径
[in]node待保存节点
返回
是否保存成功

◆ yaml_decode() [1/12]

template<typename T>
bool rm::yaml::yaml_decode ( const Node & node,
cv::Complex< T > & value )

#include <rmvl/core/yaml.hpp>

◆ yaml_decode() [2/12]

bool rm::yaml::yaml_decode ( const Node & node,
cv::DMatch & value )
inline

#include <rmvl/core/yaml.hpp>

函数调用图:

◆ yaml_decode() [3/12]

bool rm::yaml::yaml_decode ( const Node & node,
cv::KeyPoint & value )
inline

#include <rmvl/core/yaml.hpp>

函数调用图:

◆ yaml_decode() [4/12]

bool rm::yaml::yaml_decode ( const Node & node,
cv::Mat & value )
inline

#include <rmvl/core/yaml.hpp>

函数调用图:

◆ yaml_decode() [5/12]

template<typename T, int M, int N>
bool rm::yaml::yaml_decode ( const Node & node,
cv::Matx< T, M, N > & value )

#include <rmvl/core/yaml.hpp>

函数调用图:

◆ yaml_decode() [6/12]

template<typename T>
bool rm::yaml::yaml_decode ( const Node & node,
cv::Point3_< T > & value )

#include <rmvl/core/yaml.hpp>

◆ yaml_decode() [7/12]

template<typename T>
bool rm::yaml::yaml_decode ( const Node & node,
cv::Point_< T > & value )

#include <rmvl/core/yaml.hpp>

◆ yaml_decode() [8/12]

bool rm::yaml::yaml_decode ( const Node & node,
cv::Range & value )
inline

#include <rmvl/core/yaml.hpp>

◆ yaml_decode() [9/12]

template<typename T>
bool rm::yaml::yaml_decode ( const Node & node,
cv::Rect_< T > & value )

#include <rmvl/core/yaml.hpp>

◆ yaml_decode() [10/12]

template<typename T>
bool rm::yaml::yaml_decode ( const Node & node,
cv::Scalar_< T > & value )

#include <rmvl/core/yaml.hpp>

◆ yaml_decode() [11/12]

template<typename T>
bool rm::yaml::yaml_decode ( const Node & node,
cv::Size_< T > & value )

#include <rmvl/core/yaml.hpp>

◆ yaml_decode() [12/12]

template<typename T, int N>
bool rm::yaml::yaml_decode ( const Node & node,
cv::Vec< T, N > & value )

#include <rmvl/core/yaml.hpp>

函数调用图:

◆ yaml_encode() [1/12]

template<typename T>
bool rm::yaml::yaml_encode ( Node & node,
const cv::Complex< T > & value )

#include <rmvl/core/yaml.hpp>

◆ yaml_encode() [2/12]

bool rm::yaml::yaml_encode ( Node & node,
const cv::DMatch & value )
inline

#include <rmvl/core/yaml.hpp>

函数调用图:

◆ yaml_encode() [3/12]

bool rm::yaml::yaml_encode ( Node & node,
const cv::KeyPoint & value )
inline

#include <rmvl/core/yaml.hpp>

函数调用图:

◆ yaml_encode() [4/12]

bool rm::yaml::yaml_encode ( Node & node,
const cv::Mat & value )
inline

#include <rmvl/core/yaml.hpp>

函数调用图:

◆ yaml_encode() [5/12]

template<typename T, int M, int N>
bool rm::yaml::yaml_encode ( Node & node,
const cv::Matx< T, M, N > & value )

#include <rmvl/core/yaml.hpp>

函数调用图:

◆ yaml_encode() [6/12]

template<typename T>
bool rm::yaml::yaml_encode ( Node & node,
const cv::Point3_< T > & value )

#include <rmvl/core/yaml.hpp>

◆ yaml_encode() [7/12]

template<typename T>
bool rm::yaml::yaml_encode ( Node & node,
const cv::Point_< T > & value )

#include <rmvl/core/yaml.hpp>

◆ yaml_encode() [8/12]

bool rm::yaml::yaml_encode ( Node & node,
const cv::Range & value )
inline

#include <rmvl/core/yaml.hpp>

◆ yaml_encode() [9/12]

template<typename T>
bool rm::yaml::yaml_encode ( Node & node,
const cv::Rect_< T > & value )

#include <rmvl/core/yaml.hpp>

◆ yaml_encode() [10/12]

template<typename T>
bool rm::yaml::yaml_encode ( Node & node,
const cv::Scalar_< T > & value )

#include <rmvl/core/yaml.hpp>

◆ yaml_encode() [11/12]

template<typename T>
bool rm::yaml::yaml_encode ( Node & node,
const cv::Size_< T > & value )

#include <rmvl/core/yaml.hpp>

◆ yaml_encode() [12/12]

template<typename T, int N>
bool rm::yaml::yaml_encode ( Node & node,
const cv::Vec< T, N > & value )

#include <rmvl/core/yaml.hpp>