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 
85  KnownActions myActions;
86 
88 
89 };
90 
91 
92 #endif
93 
94 /****************************************************************************/
95 
KnownActions myActions
Build actions that shall be executed during the simulation.
ActionType
Known action types.
The simulated network and simulation perfomer.
Definition: MSNet.h:92
std::map< std::string, ActionType > KnownActions
Definitions of a storage for build actions.
Encapsulated SAX-Attributes.
void buildSaveTLSwitchesCommand(const SUMOSAXAttributes &attrs, const std::string &basePath)
Builds an action which saves the switch times of links into a file.
void addAction(const SUMOSAXAttributes &attrs, const std::string &basePath)
Builds an action and saves it for further use.
NLDiscreteEventBuilder(MSNet &net)
Constructor.
NLDiscreteEventBuilder & operator=(const NLDiscreteEventBuilder &)
void buildSaveTLStateCommand(const SUMOSAXAttributes &attrs, const std::string &basePath)
Builds an action which saves the state of a certain tls into a file.
void buildSaveTLSwitchStatesCommand(const SUMOSAXAttributes &attrs, const std::string &basePath)
Builds an action which saves the switch times and states of tls into a file.