SUMO - Simulation of Urban MObility
Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
SystemFrame.cpp
Go to the documentation of this file.
1
/****************************************************************************/
9
// A set of actions common to all applications
10
/****************************************************************************/
11
// SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/
12
// Copyright (C) 2001-2012 DLR (http://www.dlr.de/) and contributors
13
/****************************************************************************/
14
//
15
// This file is part of SUMO.
16
// SUMO is free software: you can redistribute it and/or modify
17
// it under the terms of the GNU General Public License as published by
18
// the Free Software Foundation, either version 3 of the License, or
19
// (at your option) any later version.
20
//
21
/****************************************************************************/
22
23
24
// ===========================================================================
25
// included modules
26
// ===========================================================================
27
#ifdef _MSC_VER
28
#include <
windows_config.h
>
29
#else
30
#include <
config.h
>
31
#endif
32
33
#include "
SystemFrame.h
"
34
#include <string>
35
#include <
utils/xml/XMLSubSys.h
>
36
#include <
utils/common/MsgHandler.h
>
37
#include <
utils/options/OptionsCont.h
>
38
#include "
RandHelper.h
"
39
40
#ifdef CHECK_MEMORY_LEAKS
41
#include <
foreign/nvwa/debug_new.h
>
42
#endif // CHECK_MEMORY_LEAKS
43
44
45
// ===========================================================================
46
// method definitions
47
// ===========================================================================
48
void
49
SystemFrame::addConfigurationOptions
(
OptionsCont
& oc) {
50
oc.
addOptionSubTopic
(
"Configuration"
);
51
52
oc.
doRegister
(
"configuration-file"
,
'c'
,
new
Option_FileName
());
53
oc.
addSynonyme
(
"configuration-file"
,
"configuration"
);
54
oc.
addDescription
(
"configuration-file"
,
"Configuration"
,
"Loads the named config on startup"
);
55
56
oc.
doRegister
(
"save-configuration"
,
new
Option_FileName
());
57
oc.
addSynonyme
(
"save-config"
,
"save-configuration"
);
58
oc.
addDescription
(
"save-configuration"
,
"Configuration"
,
"Saves current configuration into FILE"
);
59
60
oc.
doRegister
(
"save-template"
,
new
Option_FileName
());
61
oc.
addDescription
(
"save-template"
,
"Configuration"
,
"Saves a configuration template (empty) into FILE"
);
62
63
oc.
doRegister
(
"save-schema"
,
new
Option_FileName
());
64
oc.
addDescription
(
"save-schema"
,
"Configuration"
,
"Saves the configuration schema into FILE"
);
65
66
oc.
doRegister
(
"save-commented"
,
new
Option_Bool
(
false
));
67
oc.
addSynonyme
(
"save-commented"
,
"save-template.commented"
);
68
oc.
addDescription
(
"save-commented"
,
"Configuration"
,
"Adds comments to saved template, configuration, or schema"
);
69
}
70
71
72
void
73
SystemFrame::addReportOptions
(
OptionsCont
& oc) {
74
oc.
addOptionSubTopic
(
"Report"
);
75
76
oc.
doRegister
(
"verbose"
,
'v'
,
new
Option_Bool
(
false
));
77
oc.
addDescription
(
"verbose"
,
"Report"
,
"Switches to verbose output"
);
78
79
oc.
doRegister
(
"print-options"
,
'p'
,
new
Option_Bool
(
false
));
80
oc.
addDescription
(
"print-options"
,
"Report"
,
"Prints option values before processing"
);
81
82
oc.
doRegister
(
"help"
,
'?'
,
new
Option_Bool
(
false
));
83
oc.
addDescription
(
"help"
,
"Report"
,
"Prints this screen"
);
84
85
oc.
doRegister
(
"version"
,
'V'
,
new
Option_Bool
(
false
));
86
oc.
addDescription
(
"version"
,
"Report"
,
"Prints the current version"
);
87
88
oc.
doRegister
(
"no-warnings"
,
'W'
,
new
Option_Bool
(
false
));
89
oc.
addSynonyme
(
"no-warnings"
,
"suppress-warnings"
,
true
);
90
oc.
addDescription
(
"no-warnings"
,
"Report"
,
"Disables output of warnings"
);
91
92
oc.
doRegister
(
"log"
,
'l'
,
new
Option_FileName
());
93
oc.
addSynonyme
(
"log"
,
"log-file"
);
94
oc.
addDescription
(
"log"
,
"Report"
,
"Writes all messages to FILE (implies verbose)"
);
95
96
oc.
doRegister
(
"message-log"
,
new
Option_FileName
());
97
oc.
addDescription
(
"message-log"
,
"Report"
,
"Writes all non-error messages to FILE (implies verbose)"
);
98
99
oc.
doRegister
(
"error-log"
,
new
Option_FileName
());
100
oc.
addDescription
(
"error-log"
,
"Report"
,
"Writes all warnings and errors to FILE"
);
101
}
102
103
104
void
105
SystemFrame::close
() {
106
// close the xml-subsystem
107
XMLSubSys::close
();
108
// delete build program options
109
OptionsCont::getOptions
().
clear
();
110
// delete messages
111
MsgHandler::cleanupOnEnd
();
112
}
113
114
115
/****************************************************************************/
116
build
buildd
sumo-0.15.0~dfsg
src
utils
common
SystemFrame.cpp
Generated on Wed Jul 18 2012 22:58:36 for SUMO - Simulation of Urban MObility by
1.8.1.1