![]() |
FMT 0.9.8
Forest management tools for forest planning
|
#include <FMTconstants.hpp>
Public Member Functions | |
| FMTconstants () | |
| ~FMTconstants ()=default | |
| FMTconstants (const FMTconstants &rhs) | |
| void | set (const std::string &key, std::vector< double >values) |
| template<typename T > | |
| 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 |
| FMTconstants & | operator= (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) | |
| FMTobject & | operator= (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. | |
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.
| Core::FMTconstants::FMTconstants | ( | ) |
Default constructor for FMTconstants.
|
default |
Default destructor for FMTconstants.
| Core::FMTconstants::FMTconstants | ( | const FMTconstants & | rhs | ) |
Default copy constructor for FMTconstants.
| 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)
| std::vector< T > Core::FMTconstants::getall | ( | std::string | key | ) | const |
For a given constant (key) the function gets all the values of the constant.
| bool Core::FMTconstants::isconstant | ( | std::string | value | ) | const |
Returns true if the (value) is considered a constant.
| 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.
| Core::FMTconstants::operator std::string | ( | ) | const |
Returns the FMTconstants as a constant section (.con) in a string.
| FMTconstants & Core::FMTconstants::operator= | ( | const FMTconstants & | rhs | ) |
Copy assignment operator for FMTconstants.
| 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.
|
friend |
Serialize function is for serialization, used to do multiprocessing across multiple cpus (pickle in Pyhton)