![]() |
Fixposition SDK 0.0.0-heads/main-0-g97f6014
Collection of c++ libraries and apps for use with Fixposition products on Linux
|
YAML utilities. More...
Functions | |
| bool | StringToYaml (const std::string &yaml_str, YAML::Node &yaml_node) |
| Parse YAML string. | |
| std::string | YamlToString (const YAML::Node &yaml_node) |
| Stringify YAML node. | |
| std::vector< std::string > | GetKeysFromYaml (const YAML::Node &yaml_node, const std::string &key="") |
| Get keys in YAML. | |
YAML utilities.
| bool fpsdk::common::yaml::StringToYaml | ( | const std::string & | yaml_str, |
| YAML::Node & | yaml_node ) |
Parse YAML string.
| [in] | yaml_str | The YAML string |
| [out] | yaml_node | The parsed YAML node |
| std::string fpsdk::common::yaml::YamlToString | ( | const YAML::Node & | yaml_node | ) |
Stringify YAML node.
| [in] | yaml_node | The YAML node to stringfy |
| std::vector< std::string > fpsdk::common::yaml::GetKeysFromYaml | ( | const YAML::Node & | yaml_node, |
| const std::string & | key = "" ) |
Get keys in YAML.
For example, for the yaml node: key: foo: 1 bar:
GetKeysFromYaml(node, "key") would return [ "bar", "baz", "foo" ].
| [in] | yaml_node | The YAML node |
| [in] | key | The entry in the node to use, can be empty to use the node itself |