FFSM++  1.1.0
French Forest Sector Model ++
Scheduler.h
Go to the documentation of this file.
1 /***************************************************************************
2  * Copyright (C) 2015 by Laboratoire d'Economie Forestière *
3  * http://ffsm-project.org *
4  * *
5  * This program is free software; you can redistribute it and/or modify *
6  * it under the terms of the GNU General Public License as published by *
7  * the Free Software Foundation; either version 3 of the License, or *
8  * (at your option) any later version, given the compliance with the *
9  * exceptions listed in the file COPYING that is distribued together *
10  * with this file. *
11  * *
12  * This program is distributed in the hope that it will be useful, *
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15  * GNU General Public License for more details. *
16  * *
17  * You should have received a copy of the GNU General Public License *
18  * along with this program; if not, write to the *
19  * Free Software Foundation, Inc., *
20  * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
21  ***************************************************************************/
22 #ifndef STDSCHEDULER_H
23 #define STDSCHEDULER_H
24 
25 #include <string>
26 #include <vector>
27 #include <stdexcept>
28 #include <iostream>
29 #include <sstream>
30 
31 // regmas headers..
32 #include "BaseClass.h"
33 //#include "ModelData.h"
34 
35 /// Manage the yearly loops
36 
37 /**
38 This class is responsable to manage the time-dimension of the program.
39 <br>It start its job when Init has ended and schedule the various operation to be done during the year loops.
40 @author Antonello Lobianco
41 */
42 class Scheduler: public BaseClass{
43 
44 public:
45  Scheduler(ThreadManager* MTHREAD_h);
46  ~Scheduler();
47  void run();
48  int getIteration(){return iteration;};
49  int getYear(){return year;}
50  void setYear(const int& year_h){year = year_h;}
51  void advanceYear(){year += 1;}
52 
53 private:
54  int iteration;
55  int year;
56 
57 };
58 
59 #endif
void advanceYear()
Definition: Scheduler.h:51
Manage the yearly loops.
Definition: Scheduler.h:42
void run()
Definition: Scheduler.cpp:41
Thread manager. Responsable to manage the main thread and "speak" with the GUI.
Definition: ThreadManager.h:65
Scheduler(ThreadManager *MTHREAD_h)
Definition: Scheduler.cpp:32
int getYear()
Definition: Scheduler.h:49
int year
Definition: Scheduler.h:55
Base class for the regmas application.
Definition: BaseClass.h:239
int iteration
Definition: Scheduler.h:54
int getIteration()
Definition: Scheduler.h:48
void setYear(const int &year_h)
Definition: Scheduler.h:50
This file is the header of BaseClass and it is included by ALL compiled code.