8#ifndef FMToutputparser_Hm_included
9#define FMToutputparser_Hm_included
13#include <boost/regex.hpp>
23 class FMTOutputSource;
70 std::vector<Core::FMTOutput>
read(
const std::vector<Core::FMTTheme>& themes,
71 const std::vector<Core::FMTAction>& actions,
73 const std::string& location);
86 std::vector<Core::FMTOutput>
addOutputs(
const std::vector<Core::FMTOutput> oldoutputs,
87 const std::vector<Core::FMTTheme>& themes,
88 const std::vector<Core::FMTAction>& actions,
90 const std::string& location,
91 std::vector<std::string> outputsnames = std::vector<std::string>());
98 void write(
const std::vector<Core::FMTOutput>& outputs,
const std::string& location)
const;
102 const static boost::regex m_rxoutput;
105 const static boost::regex m_rxsource;
108 const static boost::regex m_rxtar;
111 const static boost::regex m_rxgrp;
114 const static boost::regex m_rxoutputconstant;
125 void _readNFill(std::vector<Core::FMTOutput>* outputs,
126 const std::vector<Core::FMTTheme>& themes,
127 const std::vector<Core::FMTAction>& actions,
129 const std::string& location);
142 void _appendToOutput(
143 const std::string& strvalue,
145 const int& themetarget,
146 const size_t& lastoutput,
147 std::string& lastoperator,
148 std::vector<std::string>& stroperators,
149 std::vector<Core::FMTOutputSource>& sources,
150 std::vector<Core::FMTOperator>& operators)
const;
#define FMTEXPORT
Definition: FMTutility.h:125
Class holding the constants defined in the constants section of a model, used by the parsers.
Definition: FMTConstants.h:28
FMTList containing multiple yield handlers as seen in the yield section, holding the information rela...
Definition: FMTYields.h:44
Parser reading and writing a vector of FMTOutput from or into a file.
Definition: FMTOutputParser.h:35
std::vector< Core::FMTOutput > addOutputs(const std::vector< Core::FMTOutput > oldoutputs, const std::vector< Core::FMTTheme > &themes, const std::vector< Core::FMTAction > &actions, const Core::FMTYields &ylds, const Core::FMTConstants &constants, const std::string &location, std::vector< std::string > outputsnames=std::vector< std::string >())
Read an output file and add the desired outputs to a vector of outputs.
~FMTOutputParser()=default
Default destructor for FMTOutputParser.
FMTOutputParser(const FMTOutputParser &rhs)=default
Copy constructor for FMTOutputParser.
std::vector< Core::FMTOutput > read(const std::vector< Core::FMTTheme > &themes, const std::vector< Core::FMTAction > &actions, const Core::FMTYields &ylds, const Core::FMTConstants &constants, const std::string &location)
Read an output file.
FMTOutputParser()
Default constructor for FMTOutputParser.
void write(const std::vector< Core::FMTOutput > &outputs, const std::string &location) const
Write a vector of outputs to a file.
Main parent class of all the parsers in FMT.
Definition: FMTParser.h:72
The Core namespace provides classes for simulating stands/strata growth/harvest through time.
Definition: FMTAction.h:34
Namespace handling all FMT's parsers. Everything related to I/O should be located in this namespace.
Definition: FMTActionParser.h:27