8#ifndef FMTCON_Hm_included
9#define FMTCON_Hm_included
11#include <boost/unordered_map.hpp>
12#include <boost/serialization/serialization.hpp>
13#include <boost/serialization/nvp.hpp>
14#include <boost/serialization/export.hpp>
52 void set(
const std::string& key, std::vector<double>values);
62 T
get(std::string key,
int period = 0)
const;
71 std::vector<T>
getAll(std::string key)
const;
85 size_t length(std::string value)
const;
98 operator std::string()
const;
107 friend class boost::serialization::access;
108 template<
class Archive>
109 void serialize(Archive& ar,
const unsigned int version)
112 ar & boost::serialization::make_nvp(
"data", m_data);
115 _exhandler->printExceptions(
"",
"FMTConstants::serialize", __LINE__, __FILE__);
120 boost::unordered_map<std::string,std::vector<double>>m_data;
#define FMTEXPORT
Definition: FMTutility.h:125
Class holding the constants defined in the constants section of a model, used by the parsers.
Definition: FMTConstants.h:28
FMTConstants(const FMTConstants &rhs)
Copy constructor for FMTConstants.
FMTConstants()
Default constructor for FMTConstants.
T get(std::string key, int period=0) const
Get the value of a given constant for a given period.
void set(const std::string &key, std::vector< double >values)
Set the values of a given constant.
~FMTConstants()=default
Default destructor for FMTConstants.
std::vector< T > getAll(std::string key) const
Get all the values of a given constant.
bool isConstant(std::string value) const
Return true if the given value is considered a constant.
size_t length(std::string value) const
Return the number of double values kept by a given constant.
Base class of multiple FMT classes holding a shared exception handler pointer and logger.
Definition: FMTObject.h:49
The Core namespace provides classes for simulating stands/strata growth/harvest through time.
Definition: FMTAction.h:34