SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GUICompleteSchemeStorage.h
Go to the documentation of this file.
1 /****************************************************************************/
8 // Storage for available visualization settings
9 /****************************************************************************/
10 // SUMO, Simulation of Urban MObility; see http://sumo-sim.org/
11 // Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors
12 /****************************************************************************/
13 //
14 // This file is part of SUMO.
15 // SUMO is free software: you can redistribute it and/or modify
16 // it under the terms of the GNU General Public License as published by
17 // the Free Software Foundation, either version 3 of the License, or
18 // (at your option) any later version.
19 //
20 /****************************************************************************/
21 #ifndef GUICompleteSchemeStorage_h
22 #define GUICompleteSchemeStorage_h
23 
24 
25 // ===========================================================================
26 // included modules
27 // ===========================================================================
28 #ifdef _MSC_VER
29 #include <windows_config.h>
30 #else
31 #include <config.h>
32 #endif
33 
34 #include <string>
35 #include <vector>
36 #include <algorithm>
37 #include <map>
39 
40 
41 // ===========================================================================
42 // class definitions
43 // ===========================================================================
49 public:
52 
53 
56 
57 
61  void add(const GUIVisualizationSettings& scheme);
62 
63 
68  GUIVisualizationSettings& get(const std::string& name);
69 
70 
75 
76 
81  bool contains(const std::string& name) const;
82 
83 
87  void remove(const std::string& name);
88 
89 
93  void setDefault(const std::string& name);
94 
95 
99  const std::vector<std::string>& getNames() const;
100 
101 
105  unsigned int getNumInitialSettings() const;
106 
107 
111  void init(FXApp* app);
112 
113 
117  void writeSettings(FXApp* app);
118 
119 
125  void saveViewport(const SUMOReal x, const SUMOReal y, const SUMOReal zoom);
126 
127 
131  void setViewport(GUISUMOAbstractView* view);
132 
133 
134 protected:
136  std::map<std::string, GUIVisualizationSettings> mySettings;
137 
139  std::vector<std::string> mySortedSchemeNames;
140 
142  std::string myDefaultSettingName;
143 
145  unsigned int myNumInitialSettings;
146 
149 
150 
151 };
152 
154 
155 
156 #endif
157 
158 /****************************************************************************/
159