Drake
Drake C++ Documentation
LoadYamlOptions Struct Reference

Detailed Description

Configuration for LoadYamlFile() and LoadYamlString() to govern when certain conditions are errors or not.

Refer to the member fields for details.

#include <drake/common/yaml/yaml_io_options.h>

Public Attributes

bool allow_yaml_with_no_cpp {false}
 Allows yaml Maps to have extra key-value pairs that are not Visited by the Serializable being parsed into. More...
 
bool allow_cpp_with_no_yaml {false}
 Allows Serializables to provide more key-value pairs than are present in the YAML data. More...
 
bool retain_map_defaults {false}
 If set to true, when parsing a std::map the Archive will merge the YAML data into the destination, instead of replacing the std::map contents entirely. More...
 

Friends

std::ostream & operator<< (std::ostream &, const LoadYamlOptions &)
 

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  ,
const LoadYamlOptions  
)
friend

Member Data Documentation

◆ allow_cpp_with_no_yaml

bool allow_cpp_with_no_yaml {false}

Allows Serializables to provide more key-value pairs than are present in the YAML data.

In other words, the structs have default values that are left intact unless the YAML data provides a value.

◆ allow_yaml_with_no_cpp

bool allow_yaml_with_no_cpp {false}

Allows yaml Maps to have extra key-value pairs that are not Visited by the Serializable being parsed into.

In other words, the Serializable types provide an incomplete schema for the YAML data. This allows for parsing only a subset of the YAML data.

◆ retain_map_defaults

bool retain_map_defaults {false}

If set to true, when parsing a std::map the Archive will merge the YAML data into the destination, instead of replacing the std::map contents entirely.

In other words, a visited std::map can have default values that are left intact unless the YAML data provides a value for that specific key.


The documentation for this struct was generated from the following file: