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

Class containing all the parameters a model needs to be solved by the different types of FMTModel. More...

#include <FMTModelParameters.h>

Inheritance diagram for Models::FMTModelParameters:
[legend]
Collaboration diagram for Models::FMTModelParameters:
[legend]

Public Member Functions

 FMTModelParameters ()
 Default constructor for FMTModelParameters.
 
 FMTModelParameters (const FMTModelParameters &rhs)
 Copy constructor for FMTModelParameters.
 
FMTModelParametersoperator= (const FMTModelParameters &rhs)
 Copy assignment operator for FMTModelParameters.
 
 ~FMTModelParameters ()=default
 Default destructor for FMTModelParameters.
 
 FMTModelParameters (FMTModelParameters &&rhs)=default
 Default move constructor for FMTModelParameters.
 
FMTModelParametersoperator= (FMTModelParameters &&rhs)=default
 Default move assignment for FMTModelParameters.
 
void swap (FMTModelParameters &rhs)
 Swap this FMTModelParameters with another.
 
bool setIntParameter (FMTintmodelparameters key, const int &value)
 Set a integer parameter.
 
bool setDblParameter (FMTdblmodelparameters key, const double &value)
 Set a double parameter.
 
bool setBoolParameter (FMTboolmodelparameters key, const bool &value)
 Set a boolean parameter.
 
bool setStrParameter (FMTstrmodelparameters p_key, const std::string &p_value)
 Set a string parameter.
 
bool setPeriodCompressTime (const int &period, const int &value)
 Set the compress time for a given period.
 
int getIntParameter (FMTintmodelparameters key) const
 Return a integer parameter.
 
double getDblParameter (FMTdblmodelparameters key) const
 Return a double parameter.
 
bool getBoolParameter (FMTboolmodelparameters key) const
 Return a boolean parameter.
 
const std::string & getStrParameter (FMTstrmodelparameters p_key) const
 Return a string parameter.
 
int getPeriodCompressTime (const int &period) const
 Return the compress time for a given period.
 
std::vector< int > getCompressTime () const
 Return the compress time for each period.
 
- Public Member Functions inherited from Core::FMTObject
 FMTObject ()
 Default constructor for FMTObject.
 
virtual ~FMTObject ()
 Default virtual destructor for FMTObject.
 
 FMTObject (const std::unique_ptr< Exception::FMTExceptionHandler > exhandler)
 Construct a FMTObject passing in the exception handler of another FMTObject.
 
 FMTObject (const FMTObject &rhs)
 Copy constructor for FMTObject.
 
FMTObjectoperator= (const FMTObject &rhs)
 Copy assignment operator for FMTObject.
 
virtual void passInLogger (const std::unique_ptr< Logging::FMTLogger > &logger)
 Pass in the logger of another FMTObject.
 
void passInExceptionHandler (const std::unique_ptr< Exception::FMTExceptionHandler > &exhandler)
 Pass in the exception handler of another FMTObject.
 
void redirectLogToFile (const std::string &location)
 Redirect the log to a specific file, appending to it.
 
virtual void setDefaultLogger ()
 Create and set a default logger to the FMTObject.
 
virtual void setQuietLogger ()
 Create and set a quiet logger to the FMTObject.
 
virtual void setTaskLogger ()
 Create and set a task logger to the FMTObject.
 
virtual void setDebugLogger ()
 Create and set a debug logger to the FMTObject.
 
void setDefaultExceptionHandler ()
 Create and set a default exception handler to the FMTObject.
 
void setQuietExceptionHandler ()
 Create and set a quiet exception handler to the FMTObject.
 
void setDebugExceptionHandler ()
 Create and set a debug exception handler to the FMTObject.
 
void setFreeExceptionHandler ()
 Create and set a free exception handler to the FMTObject.
 
void disableNestedExceptions ()
 Disable the nested exception throw of the exception handler.
 
void enableNestedExceptions ()
 Enable the nested exception throw of the exception handler.
 
void setErrorsToWarnings (const std::vector< Exception::FMTexc > &errors)
 Set a list of errors to be cast to warnings on the exception handler.
 
void setMaxWarningsBeforeSilenced (const size_t &maxwarningcount)
 Set the number of warnings raised before being silenced.
 
template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Friends

class boost::serialization::access
 

Additional Inherited Members

- Static Public Member Functions inherited from Core::FMTObject
static Logging::FMTLoggergetLogger ()
 get a pointer to the actual logger.
 
static Exception::FMTExceptionHandlergetExceptionHandler ()
 get a pointer to the actual exception handler.
 
static std::string getRuntimeLocation ()
 Return the location of the FMT shared library.
 
static unsigned long long getAvailableMemory ()
 Return the available memory in bytes.
 
static void setTerminateStack ()
 will write the stack in the log when terminate called and raise a function failed.
 
static void setAbortStack ()
 will write the stack in the log when abort called with SIGABRT and raise a function failed.
 
- Protected Member Functions inherited from Core::FMTObject
template<class Archive >
void forceSave (Archive &ar, const unsigned int version) const
 Force the serialization to save useful information, which the default FMTObject serialization does not.
 
template<class Archive >
void forceLoad (Archive &ar, const unsigned int version)
 Force the serialization to load useful information, which the default FMTObject serialization does not.
 
void checkSignals () const
 Check if the user has sent a ctrl-c signal using boost::python to FMT.
 
void setCplHandler ()
 Pass the FMT exception handler to the GDAL exception handler (GDAL only).
 
- Static Protected Member Functions inherited from Core::FMTObject
static std::chrono::time_point< std::chrono::high_resolution_clock > getClock ()
 Return a clock of the current time.
 
template<class chrono >
static double getDuration (const std::chrono::time_point< std::chrono::high_resolution_clock > &startclock)
 Return the time elapsed since a start clock as a double.
 
static std::string getDurationInSeconds (const std::chrono::time_point< std::chrono::high_resolution_clock > &startclock)
 Return the time elapsed since a start clock in seconds as a string.
 
static void _logStack ()
 Log the stack trace...
 
static void _terminate ()
 Raise an error with the boost stacktrace.
 
static void _abort (int p_signal)
 Raise an error with the boost stacktrace on abort.
 
- Static Protected Attributes inherited from Core::FMTObject
static std::unique_ptr< Exception::FMTExceptionHandler_exhandler
 A shared pointer to the exception handler.
 
static std::unique_ptr< Logging::FMTLogger_logger
 A shared pointer to the logger.
 

Detailed Description

Class containing all the parameters a model needs to be solved by the different types of FMTModel.

Constructor & Destructor Documentation

◆ FMTModelParameters() [1/3]

Models::FMTModelParameters::FMTModelParameters ( )

Default constructor for FMTModelParameters.

◆ FMTModelParameters() [2/3]

Models::FMTModelParameters::FMTModelParameters ( const FMTModelParameters rhs)

Copy constructor for FMTModelParameters.

Parameters
[in]rhsthe FMTModelParameters to copy.

◆ ~FMTModelParameters()

Models::FMTModelParameters::~FMTModelParameters ( )
default

Default destructor for FMTModelParameters.

◆ FMTModelParameters() [3/3]

Models::FMTModelParameters::FMTModelParameters ( FMTModelParameters &&  rhs)
default

Default move constructor for FMTModelParameters.

Parameters
[in]rhsthe FMTModelParameters to move from.

Member Function Documentation

◆ getBoolParameter()

bool Models::FMTModelParameters::getBoolParameter ( FMTboolmodelparameters  key) const

Return a boolean parameter.

Parameters
[in]keythe parameter key.
Returns
the parameter value.

◆ getCompressTime()

std::vector< int > Models::FMTModelParameters::getCompressTime ( ) const

Return the compress time for each period.

Returns
the compress time values.

◆ getDblParameter()

double Models::FMTModelParameters::getDblParameter ( FMTdblmodelparameters  key) const

Return a double parameter.

Parameters
[in]keythe parameter key.
Returns
the parameter value.

◆ getIntParameter()

int Models::FMTModelParameters::getIntParameter ( FMTintmodelparameters  key) const

Return a integer parameter.

Parameters
[in]keythe parameter key.
Returns
the parameter value.

◆ getPeriodCompressTime()

int Models::FMTModelParameters::getPeriodCompressTime ( const int &  period) const

Return the compress time for a given period.

Parameters
[in]periodthe period.
Returns
the compress time value.

◆ getStrParameter()

const std::string & Models::FMTModelParameters::getStrParameter ( FMTstrmodelparameters  p_key) const

Return a string parameter.

Parameters
[in]p_keythe parameter key.
Returns
the parameter value.

◆ operator=() [1/2]

FMTModelParameters & Models::FMTModelParameters::operator= ( const FMTModelParameters rhs)

Copy assignment operator for FMTModelParameters.

Parameters
[in]rhsthe FMTModelParameters to copy.
Returns
a reference to this FMTModelParameters.

◆ operator=() [2/2]

FMTModelParameters & Models::FMTModelParameters::operator= ( FMTModelParameters &&  rhs)
default

Default move assignment for FMTModelParameters.

Parameters
[in]rhsthe FMTModelParameters to move from.
Returns
a reference to this FMTModelParameters.

◆ setBoolParameter()

bool Models::FMTModelParameters::setBoolParameter ( FMTboolmodelparameters  key,
const bool &  value 
)

Set a boolean parameter.

Parameters
[in]keythe parameter key.
[in]valuethe value to set.
Returns
true if the parameter is set else false.

◆ setDblParameter()

bool Models::FMTModelParameters::setDblParameter ( FMTdblmodelparameters  key,
const double &  value 
)

Set a double parameter.

Parameters
[in]keythe parameter key.
[in]valuethe value to set.
Returns
true if the parameter is set else false.

◆ setIntParameter()

bool Models::FMTModelParameters::setIntParameter ( FMTintmodelparameters  key,
const int &  value 
)

Set a integer parameter.

Parameters
[in]keythe parameter key.
[in]valuethe value to set.
Returns
true if the parameter is set else false.

◆ setPeriodCompressTime()

bool Models::FMTModelParameters::setPeriodCompressTime ( const int &  period,
const int &  value 
)

Set the compress time for a given period.

Parameters
[in]periodthe period.
[in]valuethe compress time value.
Returns
true if the value is set else false.

◆ setStrParameter()

bool Models::FMTModelParameters::setStrParameter ( FMTstrmodelparameters  p_key,
const std::string &  p_value 
)

Set a string parameter.

Parameters
[in]p_keythe parameter key.
[in]p_valuethe value to set.
Returns
true if the parameter is set else false.

◆ swap()

void Models::FMTModelParameters::swap ( FMTModelParameters rhs)

Swap this FMTModelParameters with another.

Parameters
[in,out]rhsthe FMTModelParameters to swap with.

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

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