File: options1.cc

package info (click to toggle)
simrisc 16.06.00-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,568 kB
  • sloc: cpp: 6,889; fortran: 669; makefile: 112; ansic: 112; sh: 107
file content (48 lines) | stat: -rw-r--r-- 1,011 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#define XERR
#include "options.ih"

Options::Options()
:
    d_arg(Arg::instance()),
    d_naturalDeathAge(END_AGE),
    d_tumorAge(END_AGE),
    d_lastCase(0)
{
    imsg.off();

    if (char *cp = getenv("HOME"); cp)
        d_home = cp;

    if (d_arg.option('V'))
    {
        d_specified[STARTUP] += 'V';
        imsg.on();
    }

    configOption();                         // set d_config[STARTUP]
    baseOption();

    fileOption(d_dataFile, 'D');
    fileOption(d_roundsFile, 'R');
//FBB    fileOption(d_sensitivityFile, 'S');
    fileOption(d_spreadFile, 's');
    fileOption(d_parametersFile, 'P');

    string value;
    if (d_arg.option(&value, 'a'))
        deathAgeOption(value);

    if (d_arg.option(&value, 'd'))
        cumDeathOption(value);

    if (d_arg.option(&value, 't'))
        tumorAgeOption(value);

    if (d_arg.option(&value, 'l'))
        lastCaseOption(value);

    if (d_arg.option(&value, "log"))
        logOption(value);

    setSimulationType();                // 'c'
}