Subversion Repositories public iLand

Rev

Rev 1221 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1
 
1033 werner 2
/********************************************************************************************
3
**    iLand - an individual based forest landscape and disturbance model
4
**    http://iland.boku.ac.at
5
**    Copyright (C) 2009-  Werner Rammer, Rupert Seidl
6
**
7
**    This program is free software: you can redistribute it and/or modify
8
**    it under the terms of the GNU General Public License as published by
9
**    the Free Software Foundation, either version 3 of the License, or
10
**    (at your option) any later version.
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, see <http://www.gnu.org/licenses/>.
19
********************************************************************************************/
810 werner 20
#ifndef FOMEWRAPPER_H
21
#define FOMEWRAPPER_H
22
 
23
#include "expressionwrapper.h"
870 werner 24
 
905 werner 25
namespace ABE {
811 werner 26
class FMStand;
810 werner 27
 
811 werner 28
 
810 werner 29
/** FOMEWrapper provides the context for the Forest Management Engine
30
 *  This wrapper blends activties, stand variables, and agent variables together.
31
*/
32
 
33
class FOMEWrapper: public ExpressionWrapper
34
{
35
public:
869 werner 36
    FOMEWrapper(): mStand(0)  {}
37
    FOMEWrapper(const FMStand *stand):  mStand(stand) {}
810 werner 38
    virtual const QStringList getVariablesList();
39
    virtual double value(const int variableIndex);
40
 
41
private:
42
    void buildVarList();
43
    double valueActivity(const int variableIndex);
44
    double valueStand(const int variableIndex);
811 werner 45
    double valueSite(const int variableIndex);
46
    const FMStand *mStand;
810 werner 47
};
48
 
870 werner 49
} // namespace
810 werner 50
 
51
#endif // FOMEWRAPPER_H