SUMO - Simulation of Urban MObility
AGActivityGenHandler.h
Go to the documentation of this file.
00001 /****************************************************************************/
00010 // The handler for parsing the statistics file.
00011 /****************************************************************************/
00012 // SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/
00013 // Copyright (C) 2001-2012 DLR (http://www.dlr.de/) and contributors
00014 // activitygen module
00015 // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/)
00016 /****************************************************************************/
00017 //
00018 //   This file is part of SUMO.
00019 //   SUMO is free software: you can redistribute it and/or modify
00020 //   it under the terms of the GNU General Public License as published by
00021 //   the Free Software Foundation, either version 3 of the License, or
00022 //   (at your option) any later version.
00023 //
00024 /****************************************************************************/
00025 #ifndef AGACTIVITYGENHANDLER_H
00026 #define AGACTIVITYGENHANDLER_H
00027 
00028 
00029 // ===========================================================================
00030 // included modules
00031 // ===========================================================================
00032 #ifdef _MSC_VER
00033 #include <windows_config.h>
00034 #else
00035 #include <config.h>
00036 #endif
00037 
00038 #include <string>
00039 #include <utils/xml/SUMOSAXHandler.h>
00040 #include <utils/common/UtilExceptions.h>
00041 #include "city/AGCity.h"
00042 #include "city/AGBusLine.h"
00043 
00044 
00045 // ===========================================================================
00046 // class declarations
00047 // ===========================================================================
00048 class RONet;
00049 
00050 
00051 // ===========================================================================
00052 // class definitions
00053 // ===========================================================================
00054 class AGActivityGenHandler : public SUMOSAXHandler {
00055 public:
00060     AGActivityGenHandler(AGCity& city, RONet* net);
00061 
00062 
00064     virtual ~AGActivityGenHandler() ;
00065 
00066 
00067 protected:
00069 
00070 
00078     virtual void myStartElement(int element,
00079                                 const SUMOSAXAttributes& attrs) ;
00081 
00082 protected:
00084 
00085 
00089     void parseGeneralCityInfo(const SUMOSAXAttributes& attrs);
00090     /*void parseInhabitants(const SUMOSAXAttributes &attrs);
00091     void parseHouseholds(const SUMOSAXAttributes &attrs);
00092     void parseChildrenAgeLimit(const SUMOSAXAttributes &attrs);
00093     void parseRetirementAgeLimit(const SUMOSAXAttributes &attrs);
00094     void parseCarRate(const SUMOSAXAttributes &attrs);
00095     void parseUnemployment(const SUMOSAXAttributes &attrs);
00096     void parseFootDistanceLimit(const SUMOSAXAttributes &attrs);
00097     void parseIncomingTraffic(const SUMOSAXAttributes &attrs);
00098     void parseOutgoingTraffic(const SUMOSAXAttributes &attrs);*/
00099 
00103     void parseParameters(const SUMOSAXAttributes& attrs);
00104 
00109     void parseStreets(const SUMOSAXAttributes& attrs);
00110 
00114     void parseCityGates(const SUMOSAXAttributes& attrs);
00115 
00119     void parseWorkHours();
00120     void parseOpeningHour(const SUMOSAXAttributes& attrs);
00121     void parseClosingHour(const SUMOSAXAttributes& attrs);
00122 
00126     void parseSchools();
00127     void parseSchool(const SUMOSAXAttributes& attrs);
00128 
00133     void parseBusStation(const SUMOSAXAttributes& attrs);
00134     void parseBusLine(const SUMOSAXAttributes& attrs);
00135     void parseStations();
00136     void parseRevStations();
00137     void parseStation(const SUMOSAXAttributes& attrs);
00138     void parseFrequency(const SUMOSAXAttributes& attrs);
00139 
00144     void parsePopulation();
00145     //void parseChildrenAccompaniment();
00146     void parseBracket(const SUMOSAXAttributes& attrs);
00147 
00148 
00149 protected:
00151     AGCity& myCity;
00152 
00154     std::string myCurrentObject;
00155     AGBusLine* currentBusLine;
00156 
00158     bool isRevStation;
00159 
00161     RONet* net;
00162 
00164     bool myProcess;
00165 
00166 
00167 private:
00169     AGActivityGenHandler(const AGActivityGenHandler& src);
00170 
00172     AGActivityGenHandler& operator=(const AGActivityGenHandler& src);
00173 
00174 };
00175 
00176 
00177 #endif
00178 
00179 /****************************************************************************/
00180 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Defines