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 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
|
//#define XERR
#include "options.ih"
bool Options::alter(int optChar, std::string const &value)
{
// if a command-line option was specified, then do not alter
// options in 'Analysis: specifications
//
if (d_specified[ANALYSIS].find(optChar) != string::npos)
return false;
d_specified[ANALYSIS] += optChar;
switch (optChar) // these options can be altered
{ // they set the [1] parameters
case 'a':
deathAge(value);
break;
case 'B':
d_base[ANALYSIS] = value;
break;
case 'c':
d_cancer[ANALYSIS] = value;
break;
case 'C':
d_config[ANALYSIS] = value;
break;
case 'D':
d_dataFile[ANALYSIS] = value;
break;
case 'l':
lastCase(value);
break;
case 'o':
throw Exception{} <<
"`one-scenario' cannot be used in scenario specifications";
break;
case 'P':
d_parametersFile[ANALYSIS] = value;
break;
case 'R':
d_roundsFile[ANALYSIS] = value;
break;
//FBB case 'S':
//FBB d_sensitivityFile[ANALYSIS] = value;
//FBB break;
case 's':
d_spreadFile[ANALYSIS] = value;
break;
case 't':
tumorAge(value);
break;
case 'V':
d_specified[ANALYSIS] += 'V';
imsg.on();
break;
}
return true;
}
|