Eclipse SUMO - Simulation of Urban MObility
NLDiscreteEventBuilder.h
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2001-2019 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials
5 // are made available under the terms of the Eclipse Public License v2.0
6 // which accompanies this distribution, and is available at
7 // http://www.eclipse.org/legal/epl-v20.html
8 // SPDX-License-Identifier: EPL-2.0
9 /****************************************************************************/
15 // missing_desc
16 /****************************************************************************/
17 #ifndef NLDiscreteEventBuilder_h
18 #define NLDiscreteEventBuilder_h
19 
20 
21 // ===========================================================================
22 // included modules
23 // ===========================================================================
24 #include <config.h>
25 
26 #include <string>
27 #include <map>
29 
30 
31 // ===========================================================================
32 // class declarations
33 // ===========================================================================
34 class MSNet;
35 
36 
37 // ===========================================================================
38 // class definitions
39 // ===========================================================================
46 public:
48  enum ActionType {
57  };
58 
61 
64 
66  void addAction(const SUMOSAXAttributes& attrs, const std::string& basePath);
67 
68 private:
70  void buildSaveTLStateCommand(const SUMOSAXAttributes& attrs, const std::string& basePath);
71 
73  void buildSaveTLSwitchesCommand(const SUMOSAXAttributes& attrs, const std::string& basePath);
74 
76  void buildSaveTLSwitchStatesCommand(const SUMOSAXAttributes& attrs, const std::string& basePath);
77 
79  void buildSaveTLSProgramCommand(const SUMOSAXAttributes& attrs, const std::string& basePath);
80 
81 private:
82  NLDiscreteEventBuilder& operator=(const NLDiscreteEventBuilder&); // just to avoid a compiler warning
83 
84 protected:
86  typedef std::map<std::string, ActionType> KnownActions;
87 
90 
92 
93 };
94 
95 
96 #endif
97 
98 /****************************************************************************/
99 
GenericSAXHandler.h
NLDiscreteEventBuilder::operator=
NLDiscreteEventBuilder & operator=(const NLDiscreteEventBuilder &)
NLDiscreteEventBuilder::NLDiscreteEventBuilder
NLDiscreteEventBuilder(MSNet &net)
Constructor.
Definition: NLDiscreteEventBuilder.cpp:44
MSNet
The simulated network and simulation perfomer.
Definition: MSNet.h:91
NLDiscreteEventBuilder::buildSaveTLSwitchesCommand
void buildSaveTLSwitchesCommand(const SUMOSAXAttributes &attrs, const std::string &basePath)
Builds an action which saves the switch times of links into a file.
Definition: NLDiscreteEventBuilder.cpp:117
NLDiscreteEventBuilder::EV_SAVETLSPROGRAM
@ EV_SAVETLSPROGRAM
"SaveTLSProgram"
Definition: NLDiscreteEventBuilder.h:56
NLDiscreteEventBuilder::myActions
KnownActions myActions
Build actions that shall be executed during the simulation.
Definition: NLDiscreteEventBuilder.h:89
NLDiscreteEventBuilder::EV_SAVETLSWITCHES
@ EV_SAVETLSWITCHES
"SaveTLSSwitchTimes"
Definition: NLDiscreteEventBuilder.h:52
NLDiscreteEventBuilder::ActionType
ActionType
Known action types.
Definition: NLDiscreteEventBuilder.h:48
NLDiscreteEventBuilder
Definition: NLDiscreteEventBuilder.h:45
NLDiscreteEventBuilder::myNet
MSNet & myNet
Definition: NLDiscreteEventBuilder.h:91
NLDiscreteEventBuilder::~NLDiscreteEventBuilder
~NLDiscreteEventBuilder()
Destructor.
Definition: NLDiscreteEventBuilder.cpp:53
NLDiscreteEventBuilder::EV_SAVETLSTATE
@ EV_SAVETLSTATE
"SaveTLSStates"
Definition: NLDiscreteEventBuilder.h:50
NLDiscreteEventBuilder::addAction
void addAction(const SUMOSAXAttributes &attrs, const std::string &basePath)
Builds an action and saves it for further use.
Definition: NLDiscreteEventBuilder.cpp:57
NLDiscreteEventBuilder::buildSaveTLSwitchStatesCommand
void buildSaveTLSwitchStatesCommand(const SUMOSAXAttributes &attrs, const std::string &basePath)
Builds an action which saves the switch times and states of tls into a file.
Definition: NLDiscreteEventBuilder.cpp:145
NLDiscreteEventBuilder::buildSaveTLSProgramCommand
void buildSaveTLSProgramCommand(const SUMOSAXAttributes &attrs, const std::string &basePath)
Builds an action which saves the tls states as a loadable program into a file.
Definition: NLDiscreteEventBuilder.cpp:173
NLDiscreteEventBuilder::buildSaveTLStateCommand
void buildSaveTLStateCommand(const SUMOSAXAttributes &attrs, const std::string &basePath)
Builds an action which saves the state of a certain tls into a file.
Definition: NLDiscreteEventBuilder.cpp:89
config.h
NLDiscreteEventBuilder::KnownActions
std::map< std::string, ActionType > KnownActions
Definitions of a storage for build actions.
Definition: NLDiscreteEventBuilder.h:86
SUMOSAXAttributes
Encapsulated SAX-Attributes.
Definition: SUMOSAXAttributes.h:56
NLDiscreteEventBuilder::EV_SAVETLSWITCHSTATES
@ EV_SAVETLSWITCHSTATES
"SaveTLSSwitchStates"
Definition: NLDiscreteEventBuilder.h:54