#include <species_input.h>
|
| template<class T > |
| std::optional< T > | get (const std::string &field) const |
| |
| template<class T > |
| T | get_or (const std::string &field, T fallback) const |
| |
| template<class T > |
| T | require (const std::string &field) const |
| |
Per-instance read wrapper over FileContent for dot-syntax species input. Prefixes every key with "<instance_name>." before delegating to the underlying FileContent. Successful reads mark the fully-qualified key as read so unread_parameters() remains accurate.
◆ get()
template<class T >
| std::optional< T > SpeciesInput::get |
( |
const std::string & |
field | ) |
const |
|
inline |
Typed accessor: the value if "<instance>.<field>" is present (marking it read), or std::nullopt if absent. Delegates to FileContent::get<T>.
◆ get_or()
template<class T >
| T SpeciesInput::get_or |
( |
const std::string & |
field, |
|
|
T |
fallback |
|
) |
| const |
|
inline |
Read-with-default: get<T>(field) if present, else fallback.
◆ require()
template<class T >
| T SpeciesInput::require |
( |
const std::string & |
field | ) |
const |
|
inline |
Required accessor: throws std::invalid_argument if the field is absent.
The documentation for this class was generated from the following files: