Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
eclipse
GitHub Repository: eclipse/sumo
Path: blob/main/src/utils/common/SystemFrame.h
169678 views
1
/****************************************************************************/
2
// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3
// Copyright (C) 2001-2025 German Aerospace Center (DLR) and others.
4
// This program and the accompanying materials are made available under the
5
// terms of the Eclipse Public License 2.0 which is available at
6
// https://www.eclipse.org/legal/epl-2.0/
7
// This Source Code may also be made available under the following Secondary
8
// Licenses when the conditions for such availability set forth in the Eclipse
9
// Public License 2.0 are satisfied: GNU General Public License, version 2
10
// or later which is available at
11
// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
12
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
13
/****************************************************************************/
14
/// @file SystemFrame.h
15
/// @author Daniel Krajzewicz
16
/// @author Michael Behrisch
17
/// @date Mon, 23.06.2003
18
///
19
// A set of actions common to all applications
20
/****************************************************************************/
21
#pragma once
22
#include <config.h>
23
24
25
// ===========================================================================
26
// class declarations
27
// ===========================================================================
28
29
class OptionsCont;
30
31
// ===========================================================================
32
// class definitions
33
// ===========================================================================
34
/**
35
* @class SystemFrame
36
* @brief A set of actions common to all applications
37
*
38
* As almost all applications within the SUMO-package share the same
39
* initialisation procedure, it is encapsulated within this class.
40
*
41
* Only two things are done herein, so far. The first is to insert
42
* options into the given options container that are used for dealing
43
* with the application's configuration.
44
*
45
* Additionally, a closing method may be found, which closes all used
46
* subsystems.
47
*/
48
class SystemFrame {
49
50
public:
51
/** @brief Adds configuration options to the given container
52
*
53
* @param[in] oc The options container to add the options to
54
* @todo let the container be retrieved
55
*/
56
static void addConfigurationOptions(OptionsCont& oc);
57
58
/** @brief Adds reporting options to the given container
59
*
60
* @param[in] oc The options container to add the options to
61
* @todo let the container be retrieved
62
*/
63
static void addReportOptions(OptionsCont& oc);
64
65
/// @brief checks shared options and sets StdDefs
66
static bool checkOptions(OptionsCont& oc);
67
68
/** @brief Closes all of an applications subsystems
69
*
70
* Closes (in this order)
71
* @arg The xml subsystem
72
* @arg The options subsystem
73
* @arg The message subsystem
74
* @see XMLSubSys::close()
75
* @see OptionsCont::clear()
76
* @see MsgHandler::cleanupOnEnd()
77
*/
78
static void close();
79
};
80
81