8#ifndef FMTMODELYIELDHANDLER_H_INCLUDED
9#define FMTMODELYIELDHANDLER_H_INCLUDED
13#include <boost/serialization/serialization.hpp>
14#include <boost/serialization/nvp.hpp>
21 class FMTtimeyieldhandler;
24 friend class boost::serialization::access;
25 template<
class Archive>
26 void serialize(Archive& ar,
const unsigned int version)
28 ar & boost::serialization::make_nvp(
"FMTyieldhandler", boost::serialization::base_object<FMTyieldhandler>(*
this));
31 std::vector<std::unique_ptr<FMTyieldmodel>>models;
32 std::map<std::string,std::pair<size_t,size_t>>yldnames;
35 virtual operator std::string()
const;
43 void setyield(
const size_t& modelid,
const size_t& yieldid,
const std::string& yldname);
44 virtual std::unique_ptr<FMTyieldhandler>
clone()
const;
47 virtual size_t size()
const;
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;
#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
~FMTmodelyieldhandler()=default
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 void clearcache()
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