The Settings class handles command line settings. More...
#include <Settings.hh>
Public Member Functions | |
| Settings () | |
| Constructor. | |
| virtual | ~Settings () |
| Destructor. | |
| void | args (int argc, char **argv) |
| Parse command line arguments. | |
| void | run () |
| Execute appropriate operations according to command line. | |
Static Public Attributes | |
| static unsigned | debug = 0 |
| Global debug bit mask. | |
Private Member Functions | |
| void | usage (char *prog, std::ostream &out, int ret) |
| Prints usage description and exits. | |
Private Attributes | |
| const char * | inFile |
| The name of the input file. | |
| const char * | outFile |
| The name of the output file or 0. | |
Static Private Attributes | |
| static struct option | opts [] |
| List of command line options. | |
The Settings class handles command line settings.
Definition at line 51 of file Settings.cc.
| void bande::Settings::args | ( | int | argc, | |
| char ** | argv | |||
| ) |
| void bande::Settings::run | ( | ) |
Execute appropriate operations according to command line.
Once all settings are in place, This method is called in order to run the requested command. Currently that means reading the requested input file and enumerating all solutions for it.
Definition at line 146 of file Settings.cc.
References CoinSeedRandom(), bande::BranchControl::getIP(), inFile, outFile, bande::IntegerProgram::randomizeObjective(), bande::IntegerProgram::readMps(), bande::BranchControl::run(), and bande::Solutions::writeToFile().
Referenced by main().
| void bande::Settings::usage | ( | char * | prog, | |
| std::ostream & | out, | |||
| int | ret | |||
| ) | [private] |
Prints usage description and exits.
This information can be displayed by passing the command line argument --help.
| prog | the name with which the program was executed, argv[0]. | |
| out | the stream to which usage information is printed. | |
| ret | the return code with which the program terminates. |
Definition at line 69 of file Settings.cc.
Referenced by args().
unsigned bande::Settings::debug = 0 [static] |
Global debug bit mask.
The value of this bit mask can be specified on the command line. At the moment only the least significant bit, 1, has any meaning. It enables tracing of the branching algorithm in BranchControl::branch().
Definition at line 41 of file Settings.hh.
Referenced by args(), and bande::BranchControl::branch().
bande::Settings::opts [static, read, private] |
List of command line options.
This list should be kept in sync with the usage() description.
Definition at line 44 of file Settings.hh.
Referenced by args().
1.6.0