GUICompleteSchemeStorage.h

Go to the documentation of this file.
00001 /****************************************************************************/
00007 // Storage for available visualization settings
00008 /****************************************************************************/
00009 // SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/
00010 // Copyright 2001-2010 DLR (http://www.dlr.de/) and contributors
00011 /****************************************************************************/
00012 //
00013 //   This program is free software; you can redistribute it and/or modify
00014 //   it under the terms of the GNU General Public License as published by
00015 //   the Free Software Foundation; either version 2 of the License, or
00016 //   (at your option) any later version.
00017 //
00018 /****************************************************************************/
00019 #ifndef GUICompleteSchemeStorage_h
00020 #define GUICompleteSchemeStorage_h
00021 
00022 
00023 // ===========================================================================
00024 // included modules
00025 // ===========================================================================
00026 #ifdef _MSC_VER
00027 #include <windows_config.h>
00028 #else
00029 #include <config.h>
00030 #endif
00031 
00032 #include <string>
00033 #include <vector>
00034 #include <algorithm>
00035 #include <map>
00036 #include <utils/gui/windows/GUISUMOAbstractView.h>
00037 
00038 
00039 // ===========================================================================
00040 // class definitions
00041 // ===========================================================================
00046 class GUICompleteSchemeStorage {
00047 public:
00049     GUICompleteSchemeStorage() throw();
00050 
00051 
00053     ~GUICompleteSchemeStorage() throw();
00054 
00055 
00059     void add(const GUIVisualizationSettings &scheme) throw();
00060 
00061 
00066     GUIVisualizationSettings &get(const std::string &name) throw();
00067 
00068 
00072     GUIVisualizationSettings &getDefault() throw();
00073 
00074 
00079     bool contains(const std::string &name) const throw();
00080 
00081 
00085     void remove(const std::string &name) throw();
00086 
00087 
00091     void setDefault(const std::string &name) throw();
00092 
00093 
00097     const std::vector<std::string> &getNames() const throw();
00098 
00099 
00103     unsigned int getNumInitialSettings() const throw();
00104 
00105 
00109     void init(FXApp *app) throw();
00110 
00111 
00115     void writeSettings(FXApp *app) throw();
00116 
00117 
00123     void saveViewport(const SUMOReal x, const SUMOReal y, const SUMOReal zoom) throw();
00124 
00125 
00129     void setViewport(GUISUMOAbstractView* view) throw();
00130 
00131 
00132 protected:
00134     std::map<std::string, GUIVisualizationSettings> mySettings;
00135 
00137     std::vector<std::string> mySortedSchemeNames;
00138 
00140     std::string myDefaultSettingName;
00141 
00143     unsigned int myNumInitialSettings;
00144 
00146     SUMOReal myX, myY, myZoom;
00147 
00148 
00149 };
00150 
00151 extern GUICompleteSchemeStorage gSchemeStorage;
00152 
00153 
00154 #endif
00155 
00156 /****************************************************************************/
00157 

Generated on Wed May 5 00:06:29 2010 for Sumo - Simulation of Urban MObility by  doxygen 1.5.6