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 /****************************************************************************/
16 // missing_desc
17 /****************************************************************************/
18 #ifndef NLDiscreteEventBuilder_h
19 #define NLDiscreteEventBuilder_h
20 
21 
22 // ===========================================================================
23 // included modules
24 // ===========================================================================
25 #include <config.h>
26 
27 #include <string>
28 #include <map>
30 
31 
32 // ===========================================================================
33 // class declarations
34 // ===========================================================================
35 class MSNet;
36 
37 
38 // ===========================================================================
39 // class definitions
40 // ===========================================================================
47 public:
49  enum ActionType {
56  };
57 
60 
63 
65  void addAction(const SUMOSAXAttributes& attrs, const std::string& basePath);
66 
67 private:
69  void buildSaveTLStateCommand(const SUMOSAXAttributes& attrs, const std::string& basePath);
70 
72  void buildSaveTLSwitchesCommand(const SUMOSAXAttributes& attrs, const std::string& basePath);
73 
75  void buildSaveTLSwitchStatesCommand(const SUMOSAXAttributes& attrs, const std::string& basePath);
76 
77 private:
78  NLDiscreteEventBuilder& operator=(const NLDiscreteEventBuilder&); // just to avoid a compiler warning
79 
80 protected:
82  typedef std::map<std::string, ActionType> KnownActions;
83 
86 
88 
89 };
90 
91 
92 #endif
93 
94 /****************************************************************************/
95 
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:92
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:113
NLDiscreteEventBuilder::myActions
KnownActions myActions
Build actions that shall be executed during the simulation.
Definition: NLDiscreteEventBuilder.h:85
NLDiscreteEventBuilder::EV_SAVETLSWITCHES
"SaveTLSSwitchTimes"
Definition: NLDiscreteEventBuilder.h:53
NLDiscreteEventBuilder::ActionType
ActionType
Known action types.
Definition: NLDiscreteEventBuilder.h:49
NLDiscreteEventBuilder
Definition: NLDiscreteEventBuilder.h:46
NLDiscreteEventBuilder::myNet
MSNet & myNet
Definition: NLDiscreteEventBuilder.h:87
NLDiscreteEventBuilder::~NLDiscreteEventBuilder
~NLDiscreteEventBuilder()
Destructor.
Definition: NLDiscreteEventBuilder.cpp:52
NLDiscreteEventBuilder::EV_SAVETLSTATE
"SaveTLSStates"
Definition: NLDiscreteEventBuilder.h:51
NLDiscreteEventBuilder::addAction
void addAction(const SUMOSAXAttributes &attrs, const std::string &basePath)
Builds an action and saves it for further use.
Definition: NLDiscreteEventBuilder.cpp:56
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:141
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:85
config.h
NLDiscreteEventBuilder::KnownActions
std::map< std::string, ActionType > KnownActions
Definitions of a storage for build actions.
Definition: NLDiscreteEventBuilder.h:82
SUMOSAXAttributes
Encapsulated SAX-Attributes.
Definition: SUMOSAXAttributes.h:57
NLDiscreteEventBuilder::EV_SAVETLSWITCHSTATES
"SaveTLSSwitchStates"
Definition: NLDiscreteEventBuilder.h:55