8#ifndef FMTYLD_Hm_included
9#define FMTYLD_Hm_included
14#include "FMTBounds.hpp"
18#include <boost/serialization/serialization.hpp>
21#include <unordered_map>
23#include <boost/serialization/export.hpp>
36class FMTAgeYieldHandler;
37class FMTTimeYieldHandler;
111 void clearRandomYieldsCache();
119 bool isYld(const
std::
string& value,
bool fromsource = false) const;
126 bool isNullYld(const
std::
string& value) const;
180 void update() override;
213 std::vector<
std::
string>getStacked() const;
222 std::vector<
std::
string>yieldnames =
std::vector<
std::
string>()) const;
250 static const
std::
string& getNullYield();
271 friend class
boost::serialization::access;
273 template<class Archive>
274 void serialize(Archive& ar, const
unsigned int version)
277 ar& boost::serialization::make_nvp(
"handlers", boost::serialization::base_object<
FMTList<std::unique_ptr<FMTYieldHandler>>>(*
this));
278 _updateYieldLocations();
282 _exhandler->printExceptions(
"",
"FMTYields::serialize", __LINE__, __FILE__);
287 std::unordered_map<std::string,size_t>m_yieldsLocations;
290 static const std::string m_nullYield;
297 std::vector<const FMTYieldHandler*> _getHandlerOfType(
FMTyldtype type)
const;
304 std::vector<FMTYieldHandler*> _getHandlers(
FMTyldtype type);
309 void _updateYieldLocations();
322 const_iterator _getFirstSeen(
const std::string& p_yield)
const;
#define FMTEXPORT
Definition: FMTutility.h:125
Yield handler for age based yields, as seen in the yield section with _AGE.
Definition: FMTAgeYieldHandler.h:24
Definition: FMTAreaParser.h:32
Filter built from masks used to preSolve and postsolve FMTMask objects.
Definition: FMTMaskFilter.h:31
Core class holding, as a boost dynamic bitset, which theme attributes are part of a mask.
Definition: FMTMask.h:96
Class holding the attributes and aggregates of a single theme, describing a part of a FMTMask.
Definition: FMTTheme.h:47
Yield handler for time based yields, indexed by period.
Definition: FMTTimeYieldHandler.h:25
Base class for yield handlers, holding a mask and the base ages of the yields.
Definition: FMTYieldHandler.h:80
Request for yield values using a development and optionally a graph vertex.
Definition: FMTYieldRequest.h:37
FMTList containing multiple yield handlers as seen in the yield section, holding the information rela...
Definition: FMTYields.h:44
void clearCache() final
Clear the caching from all FMTData.
~FMTYields()=default
Default destructor for FMTYields.
void swap(FMTYields &rhs)
Swap this FMTYields with another.
FMTYields(const FMTYields &rhs)
Copy constructor for FMTYields.
void setActionsMappingToModelHandlers(const std::vector< int > &actionids)
Clear and replace the actions mapping of every yield model handler.
FMTYields()
Default constructor for FMTYields.
bool gotYieldType(FMTyldtype type) const
Return true if the yield section has a given yield type.
std::vector< std::string > getAllYieldNames() const
Return all the yield names from the list.
void generateDefaultYields(const std::vector< Core::FMTTheme > &themes)
Generate the default yields such as _TSLA in the yield class.
Base class for the different models in FMT.
Definition: FMTModel.h:62
Non spatial simulation model, mainly used to simulate stochastic actions during the local replanning ...
Definition: FMTNssModel.h:29
The Core namespace provides classes for simulating stands/strata growth/harvest through time.
Definition: FMTAction.h:34
FMTyldtype
Enumerator describing the type of a yield (age, time, complex, model).
Definition: FMTutility.h:62
Namespace containing all enumerator and classes used to construct or manipulate the different type of...
Definition: FMTAreaParser.h:54
Definition: FMTAction.h:463