|
libcamera v0.7.1
Supporting cameras in Linux since 2019
|
A helper class for parsing a YAML file. More...
Static Public Member Functions | |
| static std::unique_ptr< ValueNode > | parse (File &file) |
| Parse a YAML file as a ValueNode. | |
A helper class for parsing a YAML file.
The YamlParser class provides an easy interface to parse the contents of a YAML file into a tree of ValueNode instances.
Example usage:
The following code illustrates how to parse the above YAML file:
The YamlParser::parse() function takes an open FILE, parses its contents, and returns a pointer to a ValueNode corresponding to the root node of the YAML document.
The parser preserves the order of items in the YAML file, for both lists and dictionaries.
Parse a YAML file as a ValueNode.
| [in] | file | The YAML file to parse |
The YamlParser::parse() function takes a file, parses its contents, and returns a pointer to a ValueNode corresponding to the root node of the YAML document.