iLand
windplugin.h
Go to the documentation of this file.
1/********************************************************************************************
2** iLand - an individual based forest landscape and disturbance model
3** http://iland-model.org
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"
25class ResourceUnit; // forward
26class QJSEngine;
27class WindModule;// forward
28class WindOut;
29
32class WindPlugin: public QObject,
35{
36 Q_OBJECT
38 #if QT_VERSION >= 0x050000
39 Q_PLUGIN_METADATA(IID "at.ac.boku.iland.windplugin" FILE "windplugin.json")
40 #endif
41
42public:
43 WindPlugin();
45 // general interface details
46 QString name();
47 QString version();
48 QString description();
49
50 // setup
52 void setup();
54 void setupResourceUnit(const ResourceUnit *ru);
56 void setupScripting(QJSEngine *engine);
57
58
59 // calculations
60 void yearBegin();
61 void run();
62 // special functions for direct access (testing)
63 WindModule *windModule() { return mWind; }
64
65private:
66 WindModule *mWind;
67 WindOut *mWindOut;
68};
69
70
71#endif // WINDPLUGIN_H
Definition: plugin_interface.h:35
ResourceUnit is the spatial unit that encapsulates a forest stand and links to several environmental ...
Definition: resourceunit.h:49
Definition: plugin_interface.h:52
The WindModule is the main object of the iLand wind module.
Definition: windmodule.h:95
Definition: windout.h:27
a iLand plugin for wind disturbances.
Definition: windplugin.h:35
void setupResourceUnit(const ResourceUnit *ru)
setup resource unit specific parameters
Definition: windplugin.cpp:81
void run()
main function that once a year (after growth)
Definition: windplugin.cpp:100
QString version()
a version identification
Definition: windplugin.cpp:56
WindPlugin()
Definition: windplugin.cpp:35
void setup()
setup after the main iLand model frame is created
Definition: windplugin.cpp:67
void yearBegin()
function executes at the beginning of a year (e.g., cleanup)
Definition: windplugin.cpp:96
QString name()
a unique name of the plugin
Definition: windplugin.cpp:51
~WindPlugin()
Definition: windplugin.cpp:43
void setupScripting(QJSEngine *engine)
setup additional javascript related features
Definition: windplugin.cpp:86
QString description()
some additional description. This info is shown in the GUI and is printed to the log file.
Definition: windplugin.cpp:61
WindModule * windModule()
Definition: windplugin.h:63