GUISettingsHandler.h

Go to the documentation of this file.
00001 /****************************************************************************/
00007 // The handler for parsing gui settings from xml.
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 GUISettingsHandler_h
00020 #define GUISettingsHandler_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 <utils/gui/windows/GUISUMOAbstractView.h>
00033 #include <utils/xml/SUMOSAXHandler.h>
00034 #include <utils/xml/XMLSubSys.h>
00035 
00036 
00037 // ===========================================================================
00038 // class definitions
00039 // ===========================================================================
00043 class GUISettingsHandler : public SUMOSAXHandler {
00044 public:
00048     GUISettingsHandler(const std::string &content, bool isFile=true) throw();
00049 
00050 
00052     ~GUISettingsHandler() throw();
00053 
00054 
00055 
00057 
00058 
00065     void myStartElement(SumoXMLTag element, const SUMOSAXAttributes &attrs) throw(ProcessError);
00067 
00068 
00069 
00073     std::string addSettings(GUISUMOAbstractView* view=0) const throw();
00074 
00075 
00079     void setViewport(GUISUMOAbstractView* view) const throw();
00080 
00081 
00087     void setViewport(SUMOReal &zoom, SUMOReal &xoff, SUMOReal &yoff) const throw();
00088 
00089 
00093     void setSnapshots(GUISUMOAbstractView* view) const throw();
00094 
00095 
00099     bool hasDecals() const throw();
00100 
00101 
00105     const std::vector<GUISUMOAbstractView::Decal>& getDecals() const throw();
00106 
00107 
00111     SUMOReal getDelay() const throw();
00112 
00113 
00114 private:
00116     GUIVisualizationSettings mySettings;
00117 
00119     SUMOReal myDelay;
00120 
00122     SUMOReal myZoom, myXPos, myYPos;
00123 
00125     std::map<SUMOTime, std::string> mySnapshots;
00126 
00128     std::vector<GUISUMOAbstractView::Decal> myDecals;
00129 
00131     SumoXMLTag myCurrentColorer;
00132 
00134     GUIColorScheme* myCurrentScheme;
00135 
00136 
00137 };
00138 
00139 #endif
00140 
00141 /****************************************************************************/

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