Planetary Orbital Evolution due to Tides
Orbital evolution of two objects experiencing tides
StellarEvolution::MESA::Header Class Reference

A class which parses the header of a MESA evolution track. More...

#include <MESAIO.h>

+ Collaboration diagram for StellarEvolution::MESA::Header:

Public Member Functions

 Header (std::ifstream &track, const std::string &filename)
 Parse the header information from the given track stream. More...
 
int get_column (MESA::Column quantity) const
 The column number corresponding to the given quantity. More...
 
const std::vector< int > & get_all_columns () const
 Returns all column numbers at once. More...
 

Private Member Functions

void read_column_numbers (std::istream &track, const std::string &filename, unsigned &line_number)
 Checks that the next line in the input stream consists of sequential numbers starting with 1. More...
 
void set_column_names ()
 Sets the column names. More...
 

Private Attributes

std::vector< std::string > __column_names
 The names of the columns in the track, indexed by MESA::Column. More...
 
std::vector< int > __column_numbers
 The column numbers of the interesting quantities, indexed by MESA::Column. More...
 

Detailed Description

A class which parses the header of a MESA evolution track.

Definition at line 101 of file MESAIO.h.

Constructor & Destructor Documentation

◆ Header()

StellarEvolution::MESA::Header::Header ( std::ifstream &  track,
const std::string &  filename 
)

Parse the header information from the given track stream.

Definition at line 167 of file MESAIO.cpp.

Member Function Documentation

◆ get_all_columns()

const std::vector<int>& StellarEvolution::MESA::Header::get_all_columns ( ) const
inline

Returns all column numbers at once.

Definition at line 130 of file MESAIO.h.

◆ get_column()

int StellarEvolution::MESA::Header::get_column ( MESA::Column  quantity) const
inline

The column number corresponding to the given quantity.

Definition at line 126 of file MESAIO.h.

◆ read_column_numbers()

void StellarEvolution::MESA::Header::read_column_numbers ( std::istream &  track,
const std::string &  filename,
unsigned &  line_number 
)
private

Checks that the next line in the input stream consists of sequential numbers starting with 1.

Skips leading empty lines, incrementing line_number appropriately.

Definition at line 128 of file MESAIO.cpp.

◆ set_column_names()

void StellarEvolution::MESA::Header::set_column_names ( )
private

Sets the column names.

Definition at line 113 of file MESAIO.cpp.

Member Data Documentation

◆ __column_names

std::vector<std::string> StellarEvolution::MESA::Header::__column_names
private

The names of the columns in the track, indexed by MESA::Column.

Definition at line 105 of file MESAIO.h.

◆ __column_numbers

std::vector<int> StellarEvolution::MESA::Header::__column_numbers
private

The column numbers of the interesting quantities, indexed by MESA::Column.

Definition at line 109 of file MESAIO.h.


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