SettingsInput.h
Go to the documentation of this file.
1/*!
2 * \file SettingsInput.h
3 * \brief Setting Inputs for SEIMS
4 *
5 * Changelog:
6 * - 1. 2017-05-30 - lj - Decoupling with Database IO.
7 *
8 * \author Junzhi Liu, LiangJun Zhu
9 * \version 2.0
10 */
11#ifndef SEIMS_SETTING_INPUT_H
12#define SEIMS_SETTING_INPUT_H
13
14#include "Settings.h"
15#include "Scenario.h"
16
17using namespace bmps;
18
19/*!
20 * \ingroup data
21 * \class SettingsInput
22 * \brief Input settings for SEIMS
23 */
24class SettingsInput: public Settings {
25public:
26 //! Constructor
27 explicit SettingsInput(vector<string>& stringvector);
28
29 static SettingsInput* Init(vector<string>& stringvector);
30
31 //! Output to log file
32 void Dump(const string& filename) OVERRIDE;
33
34 //! Get start time of simulation
35 time_t getStartTime() const { return m_startDate; }
36
37 //! Get end time of simulation
38 time_t getEndTime() const { return m_endDate; }
39
40 //! Get time interval for hillslope scale processes
41 time_t getDtHillslope() const { return m_dtHs; }
42
43 //! Get time interval for channel scale processes
44 time_t getDtChannel() const { return m_dtCh; }
45
46 //! Get daily time interval of simulation in sec
47 time_t getDtDaily() const { return 86400; }
48
49 //! Get model mode
50 string& getModelMode() { return m_mode; }
51
52 //! is storm model
53 bool isStormMode() const { return m_isStormModel; }
54
55private:
56 //! Read start and end date, simulation mode and time interval
57 bool readSimulationPeriodDate();
58
59private:
60 //! Start date of simulation
61 time_t m_startDate;
62 //! End date of simulation
63 time_t m_endDate;
64 //! Time interval for hillslope scale processes
65 time_t m_dtHs;
66 //! Time interval for channel scale processes
67 time_t m_dtCh;
68 //! Simulation mode, can be DAILY or HOURLY
69 string m_mode;
70 //! is storm model?
71 bool m_isStormModel;
72};
73#endif /* SEIMS_SETTING_INPUT_H */
Scenario class in BMP database.
Settings class to store the settings information.
#define OVERRIDE
A compatible reference to override or blank if not supported by the compiler.
Definition: basic.h:160
time_t getDtDaily() const
Get daily time interval of simulation in sec.
Definition: SettingsInput.h:47
time_t getStartTime() const
Get start time of simulation.
Definition: SettingsInput.h:35
time_t getEndTime() const
Get end time of simulation.
Definition: SettingsInput.h:38
bool isStormMode() const
is storm model
Definition: SettingsInput.h:53
void Dump(const string &filename) OVERRIDE
Output to log file.
time_t getDtChannel() const
Get time interval for channel scale processes.
Definition: SettingsInput.h:44
SettingsInput(vector< string > &stringvector)
Constructor.
time_t getDtHillslope() const
Get time interval for hillslope scale processes.
Definition: SettingsInput.h:41
string & getModelMode()
Get model mode.
Definition: SettingsInput.h:50
Base class for input or output Settings.
Definition: Settings.h:28
Input settings for SEIMS.
Definition: SettingsInput.h:24
All BMPs scenario related data, classes, and functions.
Definition: BMPArealSourceFactory.h:22