NEML2 1.4.0
Loading...
Searching...
No Matches
Parser Class Referenceabstract

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

Detailed Description

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.

#include <Parser.h>

Inheritance diagram for Parser:

Public Member Functions

 Parser ()=default
 
virtual OptionCollection parse (const std::filesystem::path &filename, const std::string &additional_input="") const =0
 Deserialize a file.
 

Constructor & Destructor Documentation

◆ Parser()

Parser ( )
default

Member Function Documentation

◆ parse()

virtual OptionCollection parse ( const std::filesystem::path & filename,
const std::string & additional_input = "" ) const
pure virtual

Deserialize a file.

Parameters
filenameName/path of the input file.
additional_inputAdditional content of the input file not included in the input file itself, e.g., from command line.
Returns
OptionCollection The extracted object options.

Implemented in HITParser.