iLand
outputmanager.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
20#ifndef OUTPUTMANAGER_H
21#define OUTPUTMANAGER_H
22#include "output.h"
23
25{
26public:
29 void addOutput(Output *output);
30 void removeOutput(const QString &tableName);
31 void setup();
32 Output *find(const QString& tableName);
33 bool execute(const QString& tableName);
34 void save();
35 void close();
36 QString wikiFormat();
37private:
38 QList<Output*> mOutputs;
39 // transactions
40 void startTransaction();
41 void endTransaction();
42 bool mTransactionOpen;
43};
44
45#endif // OUTPUTMANAGER_H
The Output class abstracts output data (database, textbased, ...).
Definition: output.h:55
Global container that handles data output.
Definition: outputmanager.h:25
void addOutput(Output *output)
add a (newly created) output category. freeing of memory is done by outputmanager
Definition: outputmanager.cpp:78
void removeOutput(const QString &tableName)
remove (if available) the output with the name 'tableName', free the memory
Definition: outputmanager.cpp:83
OutputManager()
create all outputs
Definition: outputmanager.cpp:51
~OutputManager()
Definition: outputmanager.cpp:93
void save()
save transactions of all outputs
Definition: outputmanager.cpp:129
Output * find(const QString &tableName)
search for output and return pointer, NULL otherwise
Definition: outputmanager.cpp:121
void setup()
setup of the outputs + switch on/off (from project file)
Definition: outputmanager.cpp:98
bool execute(const QString &tableName)
execute output with a given name. returns true if executed.
Definition: outputmanager.cpp:164
void close()
close all outputs
Definition: outputmanager.cpp:134
QString wikiFormat()
wiki-format of all outputs
Definition: outputmanager.cpp:188