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-2017 German Aerospace Center (DLR) and others.
4 /****************************************************************************/
5 //
6 // This program and the accompanying materials
7 // are made available under the terms of the Eclipse Public License v2.0
8 // which accompanies this distribution, and is available at
9 // http://www.eclipse.org/legal/epl-v20.html
10 //
11 /****************************************************************************/
18 // missing_desc
19 /****************************************************************************/
20 #ifndef NLDiscreteEventBuilder_h
21 #define NLDiscreteEventBuilder_h
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 <xercesc/sax2/Attributes.hpp>
34 #include <string>
35 #include <map>
37 
38 
39 // ===========================================================================
40 // class declarations
41 // ===========================================================================
42 class MSNet;
43 
44 
45 // ===========================================================================
46 // class definitions
47 // ===========================================================================
54 public:
56  enum ActionType {
63  };
64 
67 
70 
72  void addAction(const SUMOSAXAttributes& attrs, const std::string& basePath);
73 
74 private:
76  void buildSaveTLStateCommand(const SUMOSAXAttributes& attrs, const std::string& basePath);
77 
79  void buildSaveTLSwitchesCommand(const SUMOSAXAttributes& attrs, const std::string& basePath);
80 
82  void buildSaveTLSwitchStatesCommand(const SUMOSAXAttributes& attrs, const std::string& basePath);
83 
84 private:
85  NLDiscreteEventBuilder& operator=(const NLDiscreteEventBuilder&); // just to avoid a compiler warning
86 
87 protected:
89  typedef std::map<std::string, ActionType> KnownActions;
90 
92  KnownActions myActions;
93 
95 
96 };
97 
98 
99 #endif
100 
101 /****************************************************************************/
102 
KnownActions myActions
Build actions that shall be executed during the simulation.
ActionType
Known action types.
The simulated network and simulation perfomer.
Definition: MSNet.h:90
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.