Loading...
Searching...
No Matches
gridfire::io::MESANetworkFileParser Class Referencefinal

A parser for MESA-format network files. More...

`#include <network_file.h>`

Inheritance diagram for gridfire::io::MESANetworkFileParser:
[legend]
Collaboration diagram for gridfire::io::MESANetworkFileParser:
[legend]

## Public Member Functions

| MESANetworkFileParser (const std::string &filename)
| Constructs a MESANetworkFileParser.
ParsedNetworkData | parse (const std::string &filename) const override
| Parses a MESA-format network file.
Public Member Functions inherited from gridfire::io::NetworkFileParser
virtual | ~NetworkFileParser ()=default
| Virtual destructor for the base class.

## Private Types

using | LogManager = fourdst::logging::LogManager

## Private Attributes

fourdst::config::Config< config::GridFireConfig > | m_config
quill::Logger * | m_logger = LogManager::getInstance().getLogger("log")
std::string | m_filename

## Detailed Description

A parser for MESA-format network files.

This class is designed to parse reaction network files that follow the format used by the MESA stellar evolution code.

## Member Typedef Documentation

## LogManager

using gridfire::io::MESANetworkFileParser::LogManager = fourdst::logging::LogManager

private

## Constructor & Destructor Documentation

## MESANetworkFileParser()

gridfire::io::MESANetworkFileParser::MESANetworkFileParser | ( | const std::string & | filename | ) |

explicit

Constructs a MESANetworkFileParser.

Parameters

  filename | The path to the MESA network file. This may be used to pre-configure the parser.

Postcondition
  The parser is initialized with the context of the given file.

## Member Function Documentation

## parse()

ParsedNetworkData gridfire::io::MESANetworkFileParser::parse | ( | const std::string & | filename | ) | const

nodiscardoverridevirtual

Parses a MESA-format network file.

This method will read and interpret the structure of a MESA network file to extract the list of reactions.

Parameters

  filename | The path to the MESA network file.

Returns
  A `ParsedNetworkData` struct containing the list of reaction names.

Exceptions

  std::runtime_error | If the file cannot be opened or if it contains formatting errors.

Implements gridfire::io::NetworkFileParser.

## Member Data Documentation

## m_config

fourdst::config::Config<config::GridFireConfig> gridfire::io::MESANetworkFileParser::m_config

private

## m_filename

std::string gridfire::io::MESANetworkFileParser::m_filename

private

## m_logger

quill::Logger* gridfire::io::MESANetworkFileParser::m_logger = LogManager::getInstance().getLogger("log")

private

The documentation for this class was generated from the following file:

- src/include/gridfire/io/network_file.h