SystemFrame Class Reference

#include <SystemFrame.h>


Detailed Description

A set of actions common to all applications.

As almost all applications within the SUMO-package share the same initialisation procedure, it is encapsulated within this class.

Only two things are done herein, so far. The first is to insert options into the given options container that are used for dealing with the application's configuration.

Additionally, a closing method may be found, which closes all used subsystems.

Definition at line 56 of file SystemFrame.h.


Static Public Member Functions

static void addConfigurationOptions (OptionsCont &oc)
 Adds configuration options to the given container.
static void addReportOptions (OptionsCont &oc)
 Adds reporting options to the given container.
static void close ()
 Closes all of an applications subsystems.

Member Function Documentation

void SystemFrame::addConfigurationOptions ( OptionsCont oc  )  [static]

Adds configuration options to the given container.

Parameters:
[in] oc The options container to add the options to
Todo:
let the container be retrieved

Definition at line 46 of file SystemFrame.cpp.

References OptionsCont::addDescription(), OptionsCont::addOptionSubTopic(), OptionsCont::addSynonyme(), and OptionsCont::doRegister().

Referenced by ROJTRFrame::fillOptions(), RODUAFrame::fillOptions(), RODFFrame::fillOptions(), NIOptionsIO::fillOptions(), fillOptions(), and MSFrame::fillOptions().

00046                                                     {
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     oc.doRegister("save-template.mandatory-only", new Option_Bool(false));
00062     oc.addDescription("save-template.mandatory-only", "Configuration", "Saves only mandatory values into template");
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 }

void SystemFrame::addReportOptions ( OptionsCont oc  )  [static]

Adds reporting options to the given container.

Parameters:
[in] oc The options container to add the options to
Todo:
let the container be retrieved

Definition at line 71 of file SystemFrame.cpp.

References OptionsCont::addDescription(), OptionsCont::addOptionSubTopic(), and OptionsCont::doRegister().

Referenced by ROJTRFrame::fillOptions(), RODUAFrame::fillOptions(), RODFFrame::fillOptions(), NIOptionsIO::fillOptions(), fillOptions(), and MSFrame::fillOptions().

00071                                              {
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 }

void SystemFrame::close (  )  [static]

Closes all of an applications subsystems.

Closes (in this order)

Definition at line 92 of file SystemFrame.cpp.

References MsgHandler::cleanupOnEnd(), OptionsCont::clear(), XMLSubSys::close(), and OptionsCont::getOptions().

Referenced by main().

00092                    {
00093     // close the xml-subsystem
00094     XMLSubSys::close();
00095     // delete build program options
00096     OptionsCont::getOptions().clear();
00097     // delete messages
00098     MsgHandler::cleanupOnEnd();
00099 }


The documentation for this class was generated from the following files:

Generated on Wed May 5 00:07:01 2010 for Sumo - Simulation of Urban MObility by  doxygen 1.5.6