sloppy mode will not check for requirements of arguments.
this is somewhat ugly, as it might not even check for correct type (I'm not sure about that, as we only have strings right now), but it's only the tests-binary anyway...
Markt und Straßen stehn verlassen,
still erleuchtet jedes Haus,
Sinnend' geh ich durch die Gassen,
alles sieht so festlich aus.
An den Fenstern haben Frauen
buntes Spielzeug fromm geschmückt,
Tausend Kindlein stehn und schauen,
sind so wunderstill beglückt.
Und ich wandre aus den Mauern
Bis hinaus ins freie Feld,
Hehres Glänzen, heil'ges Schauern!
Wie so weit und still die Welt!
Sterne hoch die Kreise schlingen,
Aus des Schnees Einsamkeit
Steigt's wie wunderbares Singen-
O du gnadenreiche Zeit!
Merry Christmas commit ;)
Created BaseException that can act as a stringstream. You can do the following:
throw BaseException() << "some error " << variable << " foo";
Changed InvalidSettings to use BaseException, using this new syntax in Settings.
we'll soon have two runs of the option parser. The whole process will look like this:
* call register callbacks (may update options_description)
* first run of parser
* call intermediate callbacks (may check variable_map and update options_description)
* second run of parser (with new options_description)
* call checker callbacks (may check variable_map)
it is possible to register callbacks that add custom options to the settings module.
it is also possible to register callbacks that perform checks on the variable assignment afterwards.
The registering is done during the static initialization phase, i.e. before main() does anything.
Using the Register class, one can register callbacks to manipulate options or check options afterwards.
These callbacks are stored in the Callbacks class (being a singleton) and should be called by the Settings class when appropriate.
The Settings class does not call them yet.
Changed a lot in the class structure of Settings:
* Settings is now a Singleton. Obtain a new instance by Settings::instance().
* options_description objects are now static, thus a help message can be printed even if the constructor of Settings failes
* As Settings has static members, a .cpp file became necessary, hence cmake should probably be run...
* Help messages can be printed with new help and helpConfigfile routines
adding new exception that is thrown whenever loading the settings fails.
this exception is caught in mrmc-cpp.cpp. If this happens, the program is terminated.