Classes | Macros | Typedefs | Functions
Options.hpp File Reference

Defines classes and functions for making classes creatable from input files. More...

#include <exception>
#include <memory>
#include <ostream>
#include <sstream>
#include <string>
#include <utility>
#include "ErrorHandling/Error.hpp"

Go to the source code of this file.

Classes

struct  OptionContext
 Information about the nested operations being performed by the parser, for use in printing errors. A default-constructed OptionContext 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  Option
 The type that options are passed around as. Contains YAML node data and an OptionContext. More...
 
struct  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...
 

Macros

#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...
 

Typedefs

using OptionString = const char *const
 The string used in option structs.
 

Functions

std::ostreamoperator<< (std::ostream &s, const OptionContext &c) noexcept
 

Detailed Description

Defines classes and functions for making classes creatable from input files.