11#ifndef FAUNA_OUTPUT_TEXT_TABLE_WRITER_H
12#define FAUNA_OUTPUT_TEXT_TABLE_WRITER_H
101 const std::string& hft_name)
const;
Writes output data to tabular plaintext files.
Definition: text_table_writer.h:33
static const char * NA_VALUE
String to print for values that are not available (NA).
Definition: text_table_writer.h:77
bool captions_written
Whether column captions have already been written to file.
Definition: text_table_writer.h:124
static const char FIELD_SEPARATOR
Character to separate columns.
Definition: text_table_writer.h:80
std::ofstream eaten_forage_per_ind
Definition: text_table_writer.h:142
const std::set< std::string > hft_names
List of Hft names (Fauna::Hft::name) in constant order.
Definition: text_table_writer.h:130
virtual void write_datapoint(const Datapoint &datapoint)
Append spatially & temporally aggregated output data to table files.
Definition: text_table_writer.cpp:141
const TextTableWriterOptions options
User options from the instruction file.
Definition: text_table_writer.h:136
const OutputInterval interval
User-selected utput interval.
Definition: text_table_writer.h:133
std::ofstream available_forage
Definition: text_table_writer.h:139
void start_row(const Datapoint &datapoint, std::ofstream &table)
Create a new row by writing year/month/day and aggregation unit.
Definition: text_table_writer.cpp:108
static void check_file_exists(const std::string &path)
Throw an exception if output file already exists.
Definition: text_table_writer.cpp:90
std::ofstream individual_density
Definition: text_table_writer.h:144
std::vector< std::ofstream * > file_streams
List of pointers to the user-selected and active file streams.
Definition: text_table_writer.h:127
std::ofstream mass_density_per_hft
Definition: text_table_writer.h:146
static const char * FILE_EXTENSION
File extension for tabular plaintext files.
Definition: text_table_writer.h:83
std::ofstream digestibility
Definition: text_table_writer.h:141
const HerbivoreData * get_hft_data(const Datapoint *datapoint, const std::string &hft_name) const
Retrieve herbivore data from datapoint for given HFT.
Definition: text_table_writer.cpp:98
std::ofstream mass_density
Definition: text_table_writer.h:145
std::ofstream eaten_nitrogen_per_ind
Definition: text_table_writer.h:143
std::ofstream body_fat
Definition: text_table_writer.h:140
void write_captions(const Datapoint &datapoint)
Write the first line in the output files: column headers.
Definition: text_table_writer.cpp:261
OutputInterval
Time interval for aggregating output.
Definition: parameters.h:37
Global parameters for the megafauna library.
Simple container for spatially and temporally aggregated output data.
Definition: datapoint.h:31
Herbivore output data for one time unit.
Definition: herbivore_data.h:22
Options for Fauna::Output::TextTableWriter.
Definition: text_table_writer_options.h:25
Interface class for all classes that implement writing output.
Definition: writer_interface.h:20
Abstract definition for output writing classes.