FMT 1.2.0
Forest management tools for forest planning
Loading...
Searching...
No Matches
FMTConstantParser.h
Go to the documentation of this file.
1/*
2Copyright (c) 2019 Gouvernement du Québec
3
4SPDX-License-Identifier: LiLiQ-R-1.1
5License-Filename: LICENSES/EN/LiLiQ-R11unicode.txt
6*/
7
8#ifndef FMTconstantparser_Hm_included
9#define FMTconstantparser_Hm_included
10
11#include "FMTParser.h"
12#include <string>
13
14namespace Core
15{
16 class FMTConstants;
17}
18
19namespace Parser
20{
21// DocString: FMTConstantParser
26 {
27 public:
28 // DocString: FMTConstantParser()
33 // DocString: ~FMTConstantParser()
37 ~FMTConstantParser() = default;
38 // DocString: FMTConstantParser(const FMTConstantParser&)
44 // DocString: FMTConstantParser::operator=
50 FMTConstantParser& operator = (const FMTConstantParser& rhs)=default;
51 // DocString: FMTConstantParser::read
57 Core::FMTConstants read(const std::string& location);
58 // DocString: FMTConstantParser::write
64 void write(const Core::FMTConstants& constants, const std::string& location) const;
65 // DocString: FMTConstantParser:_fillConstants
69 private:
70 // DocString: FMTConstantParser::m_rxconstant
72 const static boost::regex m_rxconstant;
73 // DocString: FMTConstantParser::_fillConstants
81 bool _fillConstants(Core::FMTConstants& p_constants,
82 const std::string& p_input, bool p_allowNonValid = false) const;
83 // DocString: FMTParser::_getCleanLinewfor
91 std::queue<FMTLineInfo> _getCleanLinewfor(std::ifstream& p_stream,
92 const std::vector<Core::FMTTheme>& p_themes,
93 const Core::FMTConstants& p_cons) const override;
94
95 };
96}
97#endif // FMTconstantparser_Hm_included
#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
Parser reading and writing constants, used by the model parser.
Definition: FMTConstantParser.h:26
void write(const Core::FMTConstants &constants, const std::string &location) const
Write constants to a file.
FMTConstantParser()
Default constructor for FMTConstantParser.
FMTConstantParser(const FMTConstantParser &rhs)=default
Copy constructor for FMTConstantParser.
~FMTConstantParser()=default
Default destructor for FMTConstantParser.
Core::FMTConstants read(const std::string &location)
Read a constants 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