8#ifndef FMTYLD_H_INCLUDED
9#define FMTYLD_H_INCLUDED
18#include <boost/serialization/serialization.hpp>
21#include <unordered_map>
23#include <boost/serialization/export.hpp>
30class FMTageyieldhandler;
31class FMTtimeyieldhandler;
45 friend class boost::serialization::access;
47 template<
class Archive>
48 void serialize(Archive& ar,
const unsigned int version)
51 ar & boost::serialization::make_nvp(
"handlers", boost::serialization::base_object<
FMTlist<std::unique_ptr<FMTyieldhandler>>>(*
this));
52 updateyieldpresence();
55 _exhandler->printexceptions(
"",
"FMTyields::serialize", __LINE__, __FILE__);
60 std::unordered_map<std::string,bool>yieldpresence;
66 std::vector<const FMTyieldhandler*> gethandleroftype(FMTyldtype type)
const;
72 std::vector<FMTyieldhandler*> gethandlers(FMTyldtype type);
78 int getmaxbase(
const std::vector<const FMTyieldhandler*>& handlers)
const;
83 void updateyieldpresence();
139 bool isyld(const std::
string& value,
bool fromsource = false) const;
144 bool isnullyld(const std::
string& value) const;
175 std::map<std::
string, std::map<std::
string, std::vector<
double>>>getallyields(const
FMTtheme& target,
FMTyldtype type) const;
191 void update() override;
198 const std::vector<
FMTtheme>& originalthemes,
199 const std::vector<
FMTtheme>& newthemes) const;
204 std::vector<std::
string>getstacked() const;
212 std::vector<std::
string>yieldnames = std::vector<std::
string>()) const;
#define FMTEXPORT
Definition: FMTutility.hpp:92
Definition: FMTageyieldhandler.hpp:20
Definition: FMTlist.hpp:46
Definition: FMTmask.hpp:96
Definition: FMTmaskfilter.hpp:27
Definition: FMTbounds.hpp:342
Definition: FMTtheme.hpp:47
Definition: FMTtimeyieldhandler.hpp:21
Definition: FMTyieldrequest.hpp:36
Definition: FMTyields.hpp:40
void setactionsmappingtomodelhandlers(const std::vector< int > &actionids)
std::vector< std::string > getallyieldnames() const
void swap(FMTyields &rhs)
void generatedefaultyields(const std::vector< Core::FMTtheme > &themes)
bool gotyieldtype(FMTyldtype type) const
FMTyields(const FMTyields &rhs)
The Core namespace provides classes for simulating stands/strata growth/harvest through time.
Definition: FMTaction.hpp:31
FMTyldtype
Definition: FMTutility.hpp:45