FMT 0.9.8
Forest management tools for forest planning
Loading...
Searching...
No Matches
FMTactionparser.hpp
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 FMTactionparser_H_INCLUDED
9#define FMTactionparser_H_INCLUDED
10#include "FMTparser.hpp"
11#include "FMTutility.hpp"
12#include <boost/regex.hpp>
13#include <vector>
14#include <map>
15
16namespace Core
17{
18 class FMTconstants;
19 class FMTtheme;
20 class FMTaction;
21 class FMTyields;
22}
23
24
25namespace Parser
26{
27// DocString: FMTactionparser
33 {
34 private:
35 // DocString: FMTactionparser::rxsection
37 const static boost::regex rxsection;
38 // DocString: FMTactionparser::rxoperator
40 const static boost::regex rxoperator;
41 // DocString: FMTactionparser::sameactionas
46 std::vector<Core::FMTaction*> sameactionas(const std::string& all_set, std::vector<Core::FMTaction>& actions) const;
47 // DocString: FMTactionparser::getbounds
51 std::string getbounds(std::string& line, Core::FMTspec& spec, const Core::FMTconstants& constants, const Core::FMTyields& ylds);
52 // DocString: FMTactionparser::valagg
56 std::map<std::string, std::vector<std::string>>valagg(std::vector<Core::FMTaction>& actions, std::map<std::string, std::vector<std::string>>& aggregates);
57 // DocString: FMTactionparser::cleanactionseries
61 std::vector<std::vector<std::string>> cleanactionseries(const std::vector<std::vector<std::string>>& series) const;
62 public:
63 // DocString: FMTactionparser()
68 // DocString: ~FMTactionparser()
72 ~FMTactionparser() = default;
73 // DocString: FMTactionparser(const FMTactionparser&)
77 FMTactionparser(const FMTactionparser& rhs)=default;
78 // DocString: FMTactionparser::operator
82 FMTactionparser& operator = (const FMTactionparser& rhs)=default;
83 // DocString: FMTactionparser::read
88 std::vector<Core::FMTaction>read(const std::vector<Core::FMTtheme>& themes,
89 const Core::FMTyields& yields,const Core::FMTconstants& constants,
90 const std::string& location);
91 // DocString: FMTactionparser::write
96 void write(const std::vector<Core::FMTaction>& actions,
97 const std::string& location,bool withgcbmagg = false) const;
98 // DocString: FMTactionparser::getactionsidsofmodelyields
102 std::vector<Core::FMTaction>getGCBMactionsaggregate(const std::vector<Core::FMTaction>& actions) const;
103 };
104
105}
106
107#endif // FMTactionparser_H_INCLUDED
#define FMTEXPORT
Definition: FMTutility.hpp:92
Definition: FMTconstants.hpp:29
Definition: FMTbounds.hpp:342
Definition: FMTyields.hpp:40
Definition: FMTactionparser.hpp:33
std::vector< Core::FMTaction > read(const std::vector< Core::FMTtheme > &themes, const Core::FMTyields &yields, const Core::FMTconstants &constants, const std::string &location)
std::vector< Core::FMTaction > getGCBMactionsaggregate(const std::vector< Core::FMTaction > &actions) const
FMTactionparser(const FMTactionparser &rhs)=default
void write(const std::vector< Core::FMTaction > &actions, const std::string &location, bool withgcbmagg=false) const
Definition: FMTparser.hpp:66
The Core namespace provides classes for simulating stands/strata growth/harvest through time.
Definition: FMTaction.hpp:31
Namespace handling all FMT's parsers. Everything related to I/O should be located in this namespace.
Definition: FMTactionparser.hpp:26