GridFire 0.0.1a
General Purpose Nuclear Network
|
A parser for simple text files containing a list of reactions. More...
#include <network_file.h>
Public Member Functions | |
SimpleReactionListFileParser () | |
Constructs a SimpleReactionListFileParser. | |
ParsedNetworkData | parse (const std::string &filename) const override |
Parses a simple reaction list file. | |
![]() | |
virtual | ~NetworkFileParser ()=default |
Virtual destructor for the base class. | |
Private Types | |
using | Config = fourdst::config::Config |
using | LogManager = fourdst::logging::LogManager |
Private Attributes | |
Config & | m_config = Config::getInstance() |
quill::Logger * | m_logger = LogManager::getInstance().getLogger("log") |
A parser for simple text files containing a list of reactions.
This parser reads a file where each line contains a single reaction name. It supports comments (lines starting with '#') and ignores empty lines.
Definition at line 84 of file network_file.h.
|
private |
Definition at line 120 of file network_file.h.
|
private |
Definition at line 121 of file network_file.h.
|
explicit |
Constructs a SimpleReactionListFileParser.
Definition at line 42 of file network_file.cpp.
|
overridevirtual |
Parses a simple reaction list file.
This method reads the specified file line by line. It trims whitespace from each line, ignores lines that are empty or start with a '#' comment character, and stores the remaining lines as reaction names.
filename | The path to the simple reaction list file. |
ParsedNetworkData
struct containing the list of reaction names.std::runtime_error | If the file cannot be opened for reading. |
Algorithm
ParsedNetworkData
struct.Usage
Implements gridfire::io::NetworkFileParser.
Definition at line 44 of file network_file.cpp.
|
private |
Definition at line 122 of file network_file.h.
|
private |
Definition at line 123 of file network_file.h.