NEML2 2.0.0
|
A parser is responsible for parsing an input file into a collection of options which can be used by the Factory to manufacture corresponding objects. More...
A parser is responsible for parsing an input file into a collection of options which can be used by the Factory to manufacture corresponding objects.
The HITParser parses input files written in the HIT format.
#include <HITParser.h>
Public Member Functions | |
HITParser ()=default | |
HITParser (const HITParser &)=default | |
HITParser (HITParser &&) noexcept=default | |
HITParser & | operator= (const HITParser &)=default |
HITParser & | operator= (HITParser &&) noexcept=default |
~HITParser () override=default | |
OptionCollection | parse (const std::filesystem::path &filename, const std::string &additional_input="") const override |
Deserialize a file. | |
virtual OptionSet | extract_object_options (hit::Node *object, hit::Node *section) const |
Extract options for a specific object. | |
Public Member Functions inherited from Parser | |
Parser ()=default | |
Parser (const Parser &)=default | |
Parser (Parser &&) noexcept=default | |
Parser & | operator= (const Parser &)=default |
Parser & | operator= (Parser &&) noexcept=default |
virtual | ~Parser ()=default |
Additional Inherited Members | |
Static Public Attributes inherited from Parser | |
static const std::vector< std::string > | sections |
Known top-level sections in the input file. | |
|
default |
|
overridedefault |
|
virtual |
Extract options for a specific object.
object | The object whose options are to be extracted. |
section | The current section node. |
|
overridevirtual |
Deserialize a file.
filename | Name/path of the input file. |
additional_input | Additional content of the input file not included in the input file itself, e.g., from command line. |
Implements Parser.