8#ifndef FMTTIMEYIELDHANDLER_H_INCLUDED
9#define FMTTIMEYIELDHANDLER_H_INCLUDED
14#include <boost/serialization/serialization.hpp>
15#include <boost/serialization/nvp.hpp>
22 friend class boost::serialization::access;
23 template<
class Archive>
24 void serialize(Archive& ar,
const unsigned int version)
26 ar & boost::serialization::make_nvp(
"FMTyieldhandler", boost::serialization::base_object<FMTyieldhandler>(*
this));
27 ar & BOOST_SERIALIZATION_NVP(elements);
29 std::map<std::string, FMTdata>elements;
32 virtual operator std::string()
const;
46 virtual void setyieldvalues(
const std::string& yldname,
const int& startingperiod,
const std::vector<double>& values);
48 virtual bool push_data(
const std::string& yld,
const double& value);
50 virtual std::unique_ptr<FMTyieldhandler>
clone()
const;
53 virtual size_t size()
const;
56 virtual const FMTdata&
at(
const std::string& yldname)
const;
60 virtual std::map<std::string, std::vector<double>>
getallyieldsdata(
const int& maxbase)
const;
61 virtual std::unique_ptr<FMTyieldhandler>
getfromfactor(
const double& factor,
62 std::vector<std::string>yieldnames = std::vector<std::string>())
const;
#define FMTEXPORT
Definition: FMTutility.hpp:92
Definition: FMTdata.hpp:32
Definition: FMTmask.hpp:96
Definition: FMTtimeyieldhandler.hpp:21
FMTtimeyieldhandler(const FMTtimeyieldhandler &rhs)=default
~FMTtimeyieldhandler()=default
FMTtimeyieldhandler()=default
virtual bool push_data(const std::string &yld, const double &value)
virtual double getlastvalue(const std::string yld) const
virtual void clearcache()
virtual bool empty() const
virtual std::vector< std::string > getyieldnames() const
virtual const FMTdata & at(const std::string &yldname) const
virtual FMTdata & operator[](const std::string &yldname)
virtual std::unique_ptr< FMTyieldhandler > getfromfactor(const double &factor, std::vector< std::string >yieldnames=std::vector< std::string >()) const
virtual void setyieldvalues(const std::string &yldname, const int &startingperiod, const std::vector< double > &values)
virtual bool containsyield(const std::string &yldname) const
virtual std::map< std::string, std::vector< double > > getallyieldsdata(const int &maxbase) const
virtual size_t size() const
virtual FMTyldtype gettype() const
virtual bool push_data(const std::string &yld, const FMTdata &data)
FMTtimeyieldhandler(const FMTmask &mask)
virtual double get(const std::string &yld, const FMTyieldrequest &request) const
virtual std::unique_ptr< FMTyieldhandler > clone() const
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