FMT 0.9.8
Forest management tools for forest planning
Loading...
Searching...
No Matches
FMTmodelyieldhandler.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 FMTMODELYIELDHANDLER_H_INCLUDED
9#define FMTMODELYIELDHANDLER_H_INCLUDED
10
11#include "FMTyieldhandler.hpp"
12#include <string>
13#include <boost/serialization/serialization.hpp>
14#include <boost/serialization/nvp.hpp>
15#include <memory>
16
17namespace Core
18{
19 class FMTdata;
20 class FMTyieldmodel;
21 class FMTtimeyieldhandler;
23 {
24 friend class boost::serialization::access;
25 template<class Archive>
26 void serialize(Archive& ar, const unsigned int version)
27 {
28 ar & boost::serialization::make_nvp("FMTyieldhandler", boost::serialization::base_object<FMTyieldhandler>(*this));
29 ar & yldnames;
30 }
31 std::vector<std::unique_ptr<FMTyieldmodel>>models;
32 std::map<std::string,std::pair<size_t,size_t>>yldnames;
33 public:
34 virtual double get(const std::string& yld, const FMTyieldrequest& request) const;
35 virtual operator std::string() const;
41 std::map<std::string, size_t>getmodelsnamebyindex() const;
42 void push_backmodel(const std::unique_ptr<FMTyieldmodel>& model);
43 void setyield(const size_t& modelid,const size_t& yieldid,const std::string& yldname);
44 virtual std::unique_ptr<FMTyieldhandler>clone() const;
45 virtual bool operator == (const FMTmodelyieldhandler& rhs) const;
46 virtual bool empty() const;
47 virtual size_t size() const;
48 virtual FMTyldtype gettype() const;
49 virtual bool containsyield(const std::string& yldname) const;
50 virtual bool isnullyield(const std::string& yldname) const;
51 virtual std::vector<std::string>getyieldnames() const;
52 virtual void clearcache();
53 virtual std::unique_ptr<FMTyieldhandler> presolve(const FMTmaskfilter& filter, const std::vector<FMTtheme>& newthemes) const;
54 virtual std::unique_ptr<FMTyieldhandler> postsolve(const FMTmaskfilter& filter, const std::vector<FMTtheme>& basethemes) const;
55 // DocString: FMTyieldmodeldecisiontreel::totimehandler
60 };
61
62}
63
64#endif
#define FMTEXPORT
Definition: FMTutility.hpp:92
Definition: FMTmask.hpp:96
Definition: FMTmaskfilter.hpp:27
Definition: FMTmodelyieldhandler.hpp:23
FMTmodelyieldhandler(const FMTmodelyieldhandler &rhs)
FMTmodelyieldhandler(const FMTmask &mask)
virtual std::vector< std::string > getyieldnames() const
virtual FMTyldtype gettype() const
virtual bool containsyield(const std::string &yldname) const
virtual bool isnullyield(const std::string &yldname) const
virtual bool empty() const
virtual size_t size() const
virtual std::unique_ptr< FMTyieldhandler > postsolve(const FMTmaskfilter &filter, const std::vector< FMTtheme > &basethemes) const
void setyield(const size_t &modelid, const size_t &yieldid, const std::string &yldname)
virtual std::unique_ptr< FMTyieldhandler > clone() const
std::map< std::string, size_t > getmodelsnamebyindex() const
virtual double get(const std::string &yld, const FMTyieldrequest &request) const
virtual std::unique_ptr< FMTyieldhandler > presolve(const FMTmaskfilter &filter, const std::vector< FMTtheme > &newthemes) const
FMTtimeyieldhandler totimehandler() const
void push_backmodel(const std::unique_ptr< FMTyieldmodel > &model)
Definition: FMTtimeyieldhandler.hpp:21
Definition: FMTyieldhandler.hpp:31
Definition: FMTyieldrequest.hpp:36
The Core namespace provides classes for simulating stands/strata growth/harvest through time.
Definition: FMTaction.hpp:31
FMTyldtype
Definition: FMTutility.hpp:45