GridFire 0.0.1a
General Purpose Nuclear Network
|
An abstract base class for network file parsers. More...
#include <network_file.h>
Public Member Functions | |
virtual | ~NetworkFileParser ()=default |
Virtual destructor for the base class. | |
virtual ParsedNetworkData | parse (const std::string &filename) const =0 |
Parses a network file and returns the parsed data. | |
An abstract base class for network file parsers.
This class defines the interface for parsing files that contain reaction network definitions. Derived classes must implement the parse
method to handle specific file formats.
Definition at line 38 of file network_file.h.
|
virtualdefault |
Virtual destructor for the base class.
|
nodiscardpure virtual |
Parses a network file and returns the parsed data.
This is a pure virtual function that must be implemented by derived classes. It takes a filename as input and returns a ParsedNetworkData
struct containing the information extracted from the file.
filename | The path to the network file to parse. |
ParsedNetworkData
struct containing the parsed reaction data.std::runtime_error | If the file cannot be opened or a parsing error occurs. |
Usage
Implemented in gridfire::io::MESANetworkFileParser, and gridfire::io::SimpleReactionListFileParser.