8#ifndef FMTplanningtask_H_INCLUDED
9#define FMTplanningtask_H_INCLUDED
33 class FMTparallelwriter;
42 std::shared_ptr<FMTparallelwriter>resultswriter;
45 std::list<std::unique_ptr<Models::FMTmodel>>models;
48 std::list<std::vector<Core::FMTschedule>>allschedules;
51 std::list<std::vector<Core::FMToutput>>outputs;
59 std::list<std::unique_ptr<Models::FMTmodel>>copymodels(
const std::list<std::unique_ptr<Models::FMTmodel>>& tocopy)
const;
85 std::unique_ptr<FMTtask>
clone()
const;
97 std::vector<Core::FMTschedule>schedules = std::vector<Core::FMTschedule>(),
98 std::vector<Core::FMToutput>louputs = std::vector<Core::FMToutput>());
104 const int& maxoutputperiod,
105 const std::string& outputlocation,
106 std::string gdaldriver =
"CSV",
107 std::vector<std::string>creationoptions= std::vector<std::string>(),
109 std::string primaryfilelocatiron = std::string());
114 virtual std::vector<std::unique_ptr<FMTtask>>
split(
const unsigned int& numberoftasks)
const;
119 virtual std::unique_ptr<FMTtask>
spawn();
134 void passinlogger(
const std::shared_ptr<Logging::FMTlogger>& logger)
override;
139 template<
class ptrtype>
142 std::vector<const ptrtype*>castedptr;
143 for (
const std::unique_ptr<Models::FMTmodel>& model : models)
145 castedptr.push_back(
dynamic_cast<const ptrtype*
>(model.get()));
#define FMTEXPORT
Definition: FMTutility.hpp:92
Definition: FMTmodel.hpp:60
Definition: FMTplanningtask.hpp:39
virtual ~FMTplanningtask()=default
void passinlogger(const std::shared_ptr< Logging::FMTlogger > &logger) override
std::unique_ptr< FMTtask > clone() const
FMTplanningtask(const int &minoutputperiod, const int &maxoutputperiod, const std::string &outputlocation, std::string gdaldriver="CSV", std::vector< std::string >creationoptions=std::vector< std::string >(), Core::FMToutputlevel outputlevel=Core::FMToutputlevel::standard, std::string primaryfilelocatiron=std::string())
const std::vector< const ptrtype * > getmodelsfromdynamiccast() const
Definition: FMTplanningtask.hpp:140
virtual std::vector< std::unique_ptr< FMTtask > > split(const unsigned int &numberoftasks) const
FMTplanningtask(const FMTplanningtask &rhs)
FMTplanningtask()=default
virtual std::unique_ptr< FMTtask > spawn()
void push_back(const Models::FMTmodel &model, std::vector< Core::FMTschedule >schedules=std::vector< Core::FMTschedule >(), std::vector< Core::FMToutput >louputs=std::vector< Core::FMToutput >())
Definition: FMTtask.hpp:28
The Core namespace provides classes for simulating stands/strata growth/harvest through time.
Definition: FMTaction.hpp:31
FMToutputlevel
Definition: FMTutility.hpp:17
@ standard
Definition: FMTutility.hpp:18
Namespace containing all enumerator and classes used to construct or manipulate the different type of...
Definition: FMTareaparser.hpp:50
Namespace for parallel tasking may include multithreading / multiprocessing.
Definition: FMTopareaschedulertask.hpp:40