FMT 0.9.8
Forest management tools for forest planning
Loading...
Searching...
No Matches
Public Member Functions | Friends | List of all members
Core::FMTconstants Class Reference

#include <FMTconstants.hpp>

Inheritance diagram for Core::FMTconstants:
[legend]
Collaboration diagram for Core::FMTconstants:
[legend]

Public Member Functions

 FMTconstants ()
 
 ~FMTconstants ()=default
 
 FMTconstants (const FMTconstants &rhs)
 
void set (const std::string &key, std::vector< double >values)
 
template<typename T >
get (std::string key, int period=0) const
 
template<typename T >
std::vector< T > getall (std::string key) const
 
bool isconstant (std::string value) const
 
size_t length (std::string value) const
 
FMTconstantsoperator= (const FMTconstants &rhs)
 
 operator std::string () const
 
- Public Member Functions inherited from Core::FMTobject
 FMTobject ()
 
virtual ~FMTobject ()
 
 FMTobject (const std::shared_ptr< Exception::FMTexceptionhandler > exhandler)
 
 FMTobject (const FMTobject &rhs)
 
FMTobjectoperator= (const FMTobject &rhs)
 
virtual void passinlogger (const std::shared_ptr< Logging::FMTlogger > &logger)
 
void passinexceptionhandler (const std::shared_ptr< Exception::FMTexceptionhandler > &exhandler)
 
void redirectlogtofile (const std::string &location)
 
virtual void setdefaultlogger ()
 
virtual void setquietlogger ()
 
virtual void settasklogger ()
 
virtual void setdebuglogger ()
 
void setdefaultexceptionhandler ()
 
void setquietexceptionhandler ()
 
void setdebugexceptionhandler ()
 
void setfreeexceptionhandler ()
 
void disablenestedexceptions ()
 
void enablenestedexceptions ()
 
void seterrorstowarnings (const std::vector< Exception::FMTexc > &errors)
 
void setmaxwarningsbeforesilenced (const size_t &maxwarningcount)
 

Friends

class boost::serialization::access
 

Additional Inherited Members

- Static Public Member Functions inherited from Core::FMTobject
static std::string getruntimelocation ()
 
static unsigned long long getavailablememory ()
 
- Protected Member Functions inherited from Core::FMTobject
template<class Archive >
void forcesave (Archive &ar, const unsigned int version) const
 
template<class Archive >
void forceload (Archive &ar, const unsigned int version)
 
void checksignals () const
 
void setCPLhandler ()
 
- Static Protected Member Functions inherited from Core::FMTobject
static std::chrono::time_point< std::chrono::high_resolution_clock > getclock ()
 
template<class chrono >
static double getduration (const std::chrono::time_point< std::chrono::high_resolution_clock > &startclock)
 
static std::string getdurationinseconds (const std::chrono::time_point< std::chrono::high_resolution_clock > &startclock)
 
- Static Protected Attributes inherited from Core::FMTobject
static std::shared_ptr< Exception::FMTexceptionhandler_exhandler
 A shared pointer to the exception handler.
 
static std::shared_ptr< Logging::FMTlogger_logger
 A shared pointer to the logger.
 

Detailed Description

FMTconstants is a class only used by the FMTparsers. When a model is read sometime the user uses constants defined in the constants section. The constant is represented by a string in this section and keeps double values.

Constructor & Destructor Documentation

◆ FMTconstants() [1/2]

Core::FMTconstants::FMTconstants ( )

Default constructor for FMTconstants.

◆ ~FMTconstants()

Core::FMTconstants::~FMTconstants ( )
default

Default destructor for FMTconstants.

◆ FMTconstants() [2/2]

Core::FMTconstants::FMTconstants ( const FMTconstants rhs)

Default copy constructor for FMTconstants.

Member Function Documentation

◆ get()

template<typename T >
T Core::FMTconstants::get ( std::string  key,
int  period = 0 
) const

For a given constant (key) the function gets a value for a given (period)

◆ getall()

template<typename T >
std::vector< T > Core::FMTconstants::getall ( std::string  key) const

For a given constant (key) the function gets all the values of the constant.

◆ isconstant()

bool Core::FMTconstants::isconstant ( std::string  value) const

Returns true if the (value) is considered a constant.

◆ length()

size_t Core::FMTconstants::length ( std::string  value) const

Returns the length of the constant (value), which is the number of double values kept by the constant.

◆ operator std::string()

Core::FMTconstants::operator std::string ( ) const

Returns the FMTconstants as a constant section (.con) in a string.

◆ operator=()

FMTconstants & Core::FMTconstants::operator= ( const FMTconstants rhs)

Copy assignment operator for FMTconstants.

◆ set()

void Core::FMTconstants::set ( const std::string &  key,
std::vector< double >  values 
)

For a given constant (key) the function sets a (values) vector in the data unordered_map.

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Serialize function is for serialization, used to do multiprocessing across multiple cpus (pickle in Pyhton)


The documentation for this class was generated from the following file: