Function mola::load_yaml_file

Function Documentation

mrpt::containers::yaml mola::load_yaml_file(const std::string &fileName, const YAMLParseOptions &opts = YAMLParseOptions())

Load a YAML file from disk and fully pre-process it.

This is a convenience wrapper equivalent to:

  1. mrpt::containers::yaml::FromFile(fileName)

  2. Setting YAMLParseOptions::includesBasePath to the file’s directory.

  3. parse_yaml(yaml_to_string(raw), opts)

  4. Re-parsing the result with mrpt::containers::yaml::FromText().

Parameters:
  • fileName – Path to the YAML file to load.

  • opts – Additional parse options merged with the auto-detected includesBasePath.

Returns:

Parsed and fully pre-processed YAML node.