forked from sammy-tri/drake
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathyaml_io_options.h
32 lines (25 loc) · 1.24 KB
/
yaml_io_options.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#pragma once
#include <ostream>
namespace drake {
namespace yaml {
/** Configuration for LoadYamlFile() and LoadYamlString() to govern when certain
conditions are errors or not. Refer to the member fields for details. */
struct LoadYamlOptions {
friend std::ostream& operator<<(std::ostream&, const LoadYamlOptions&);
/** 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. */
bool allow_yaml_with_no_cpp{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. */
bool allow_cpp_with_no_yaml{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*. */
bool retain_map_defaults{false};
};
} // namespace yaml
} // namespace drake