SystemFrame.cpp
Go to the documentation of this file.00001
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifdef _MSC_VER
00025 #include <windows_config.h>
00026 #else
00027 #include <config.h>
00028 #endif
00029
00030 #include "SystemFrame.h"
00031 #include <string>
00032 #include <utils/xml/XMLSubSys.h>
00033 #include <utils/common/MsgHandler.h>
00034 #include <utils/options/OptionsCont.h>
00035 #include "RandHelper.h"
00036
00037 #ifdef CHECK_MEMORY_LEAKS
00038 #include <foreign/nvwa/debug_new.h>
00039 #endif // CHECK_MEMORY_LEAKS
00040
00041
00042
00043
00044
00045 void
00046 SystemFrame::addConfigurationOptions(OptionsCont &oc) {
00047 oc.addOptionSubTopic("Configuration");
00048
00049 oc.doRegister("configuration-file", 'c', new Option_FileName());
00050 oc.addSynonyme("configuration-file", "configuration");
00051 oc.addDescription("configuration-file", "Configuration", "Loads the named config on startup");
00052
00053 oc.doRegister("save-configuration", new Option_FileName());
00054 oc.addSynonyme("save-config", "save-configuration");
00055 oc.addDescription("save-configuration", "Configuration", "Saves current configuration into FILE");
00056
00057 oc.doRegister("save-template", new Option_FileName());
00058 oc.addDescription("save-template", "Configuration", "Saves a configuration template (empty) into FILE");
00059
00060
00061
00062
00063
00064
00065 oc.doRegister("save-template.commented", new Option_Bool(false));
00066 oc.addDescription("save-template.commented", "Configuration", "Adds comments to saved template");
00067 }
00068
00069
00070 void
00071 SystemFrame::addReportOptions(OptionsCont &oc) {
00072 oc.addOptionSubTopic("Report");
00073
00074 oc.doRegister("verbose", 'v', new Option_Bool(false));
00075 oc.addDescription("verbose", "Report", "Switches to verbose output");
00076
00077 oc.doRegister("print-options", 'p', new Option_Bool(false));
00078 oc.addDescription("print-options", "Report", "Prints option values before processing");
00079
00080 oc.doRegister("help", '?', new Option_Bool(false));
00081 oc.addDescription("help", "Report", "Prints this screen");
00082
00083 oc.doRegister("suppress-warnings", 'W', new Option_Bool(false));
00084 oc.addDescription("suppress-warnings", "Report", "Disables output of warnings");
00085
00086 oc.doRegister("log-file", 'l', new Option_FileName());
00087 oc.addDescription("log-file", "Report", "Writes all messages to FILE");
00088 }
00089
00090
00091 void
00092 SystemFrame::close() {
00093
00094 XMLSubSys::close();
00095
00096 OptionsCont::getOptions().clear();
00097
00098 MsgHandler::cleanupOnEnd();
00099 }
00100
00101
00102
00103