8#ifndef FMTOPE_Hm_included
9#define FMTOPE_Hm_included
14#include <boost/functional/hash.hpp>
15#include <boost/serialization/serialization.hpp>
16#include <boost/serialization/nvp.hpp>
89 double call(
const double& rhs1,
const double& rhs2)
const;
156 operator std::string()
const;
159 friend class boost::serialization::access;
167 template<
class Archive>
168 void serialize(Archive& ar,
const unsigned int version)
170 ar & boost::serialization::make_nvp(
"key", m_key);
#define FMTEXPORT
Definition: FMTutility.h:125
Mathematical operator usable in yield and output expressions.
Definition: FMTOperator.h:44
bool valid() const
Return true if the operator is valid.
std::string associativity() const
Return the associativity of the operator.
bool isDivide() const
Return true if the operator is a division.
double call(const double &rhs1, const double &rhs2) const
Apply the operator to two values.
FMTOperator()
Default constructor for FMTOperator.
bool isFactor() const
Return true if the operator is a multiplication or a division.
FMTokey getKey() const
Return the key of the operator.
FMTOperator(const FMTOperator &rhs)
Copy constructor for FMTOperator.
~FMTOperator()=default
Default destructor for FMTOperator.
FMTOperator(std::string strkey)
Construct a FMTOperator from a string key.
size_t hash() const
Return the hash of the operator.
FMTOperator(FMTokey lkey)
Construct a FMTOperator from an operator key.
FMTOperator reverse() const
Return the reversed operator.
int precedence() const
Return the precedence of the operator.
The Core namespace provides classes for simulating stands/strata growth/harvest through time.
Definition: FMTAction.h:34
FMTokey
Enumerator of the operators usable in an FMTOperator (multiply, divide, add, sub, comma,...
Definition: FMTOperator.h:29