Options::Option Class Reference

#include <Options.hpp>

Public Member Functions

const Contextcontext () const noexcept

void append_context (const std::string &context) noexcept
Append a line to the contained context.

template<typename T , typename Metavariables = NoSuchType>
parse_as () const
Convert to an object of type T.

Option (YAML::Node node, Context context={}) noexcept

Option (Context context) noexcept

const YAML::Node & node () const noexcept

void set_node (YAML::Node node) noexcept
Sets the node and updates the context's mark to correspond to it. More...

Detailed Description

The type that options are passed around as. Contains YAML node data and an Context.

Note
To use any methods on this class in a concrete function you must include ParseOptions.hpp, but you do not need to include that header to use this in an uninstantiated create_from_yaml::create function.

◆ Option() [1/2]

 Options::Option::Option ( YAML::Node node, Context context = {} )
inlineexplicitnoexcept
Note
This constructor overwrites the mark data in the supplied context with the one from the node.
Warning
This method is for internal use of the option parser.

◆ Option() [2/2]

 Options::Option::Option ( Context context )
inlineexplicitnoexcept
Warning
This method is for internal use of the option parser.

◆ node()

 const YAML::Node & Options::Option::node ( ) const
inlinenoexcept
Warning
This method is for internal use of the option parser.

◆ set_node()

 void Options::Option::set_node ( YAML::Node node )
inlinenoexcept

Sets the node and updates the context's mark to correspond to it.

Warning
This method is for internal use of the option parser.

The documentation for this class was generated from the following files: