Rev 1221 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
701 | werner | 1 | /******************************************************************************************** |
2 | ** iLand - an individual based forest landscape and disturbance model |
||
3 | ** http://iland.boku.ac.at |
||
4 | ** Copyright (C) 2009- Werner Rammer, Rupert Seidl |
||
5 | ** |
||
6 | ** This program is free software: you can redistribute it and/or modify |
||
7 | ** it under the terms of the GNU General Public License as published by |
||
8 | ** the Free Software Foundation, either version 3 of the License, or |
||
9 | ** (at your option) any later version. |
||
10 | ** |
||
11 | ** This program is distributed in the hope that it will be useful, |
||
12 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of |
||
13 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||
14 | ** GNU General Public License for more details. |
||
15 | ** |
||
16 | ** You should have received a copy of the GNU General Public License |
||
17 | ** along with this program. If not, see <http://www.gnu.org/licenses/>. |
||
18 | ********************************************************************************************/ |
||
19 | #ifndef WINDPLUGIN_H |
||
20 | #define WINDPLUGIN_H |
||
21 | |||
22 | #include <QObject> |
||
23 | |||
24 | #include "plugin_interface.h" |
||
25 | class ResourceUnit; // forward |
||
793 | werner | 26 | class QJSEngine; |
701 | werner | 27 | class WindModule;// forward |
1054 | werner | 28 | class WindOut; |
701 | werner | 29 | |
30 | /** a iLand plugin for wind disturbances. |
||
31 | */ |
||
32 | class WindPlugin: public QObject, |
||
33 | public DisturbanceInterface, |
||
34 | public SetupResourceUnitInterface |
||
35 | { |
||
36 | Q_OBJECT |
||
37 | Q_INTERFACES(DisturbanceInterface SetupResourceUnitInterface) |
||
780 | werner | 38 | #if QT_VERSION >= 0x050000 |
39 | Q_PLUGIN_METADATA(IID "at.ac.boku.iland.windplugin" FILE "windplugin.json") |
||
40 | #endif |
||
701 | werner | 41 | |
42 | public: |
||
43 | WindPlugin(); |
||
44 | ~WindPlugin(); |
||
45 | // general interface details |
||
46 | QString name(); ///< a unique name of the plugin |
||
47 | QString version(); ///< a version identification |
||
48 | QString description(); ///< some additional description. This info is shown in the GUI and is printed to the log file. |
||
49 | |||
50 | // setup |
||
51 | /// setup after the main iLand model frame is created |
||
52 | void setup(); |
||
53 | /// setup resource unit specific parameters |
||
54 | void setupResourceUnit(const ResourceUnit *ru); |
||
55 | /// setup additional javascript related features |
||
793 | werner | 56 | void setupScripting(QJSEngine *engine); |
701 | werner | 57 | |
58 | |||
59 | // calculations |
||
60 | void yearBegin(); |
||
61 | void run(); |
||
702 | werner | 62 | // special functions for direct access (testing) |
63 | WindModule *windModule() { return mWind; } |
||
64 | |||
701 | werner | 65 | private: |
66 | WindModule *mWind; |
||
1054 | werner | 67 | WindOut *mWindOut; |
701 | werner | 68 | }; |
69 | |||
70 | |||
71 | #endif // WINDPLUGIN_H |