|
| class | Options::Auto< T, Label > |
| | A class indicating that a parsed value can be automatically computed instead of specified. More...
|
| |
| struct | Options::Context |
| | Information about the nested operations being performed by the parser, for use in printing errors. A default-constructed Context is printed as an empty string. This struct is primarily used as an argument to PARSE_ERROR for reporting input file parsing errors. Users outside of the core option parsing code should not need to manipulate the contents. More...
|
| |
| class | Options::Option |
| | The type that options are passed around as. Contains YAML node data and an Context. More...
|
| |
| struct | Options::create_from_yaml< T > |
| | Used by the parser to create an object. The default action is to parse options using T::options. This struct may be specialized to change that behavior for specific types. More...
|
| |
| class | Options::Parser< OptionList, Group > |
| | Class that handles parsing an input file. More...
|
| |
|
| #define | PARSE_ERROR(context, m) |
| | Like ERROR("\n" << (context) << m), but instead throws an exception that will be caught in a higher level Options if not passed a top-level context. This is used to print a parsing "backtrace" since we can't pass any extra data through the yaml-cpp code. More...
|
| |
Things related to parsing YAML input files.
◆ PARSE_ERROR
| #define PARSE_ERROR |
( |
|
context, |
|
|
|
m |
|
) |
| |
Value: do { \
if ((context).top_level) { \
\
ERROR_NO_TRACE("\n" << (context) << m); \
} else { \
std::ostringstream avoid_name_collisions_PARSE_ERROR; \
\
avoid_name_collisions_PARSE_ERROR << (context) << m; \
throw ::Options::detail::propagate_context( \
avoid_name_collisions_PARSE_ERROR.str()); \
} \
} while (false)
Like ERROR("\n" << (context) << m), but instead throws an exception that will be caught in a higher level Options if not passed a top-level context. This is used to print a parsing "backtrace" since we can't pass any extra data through the yaml-cpp code.
- Parameters
-
| context | Context used to print a parsing traceback |
| m | error message, as for ERROR |