SUMO - Simulation of Urban MObility

AGActivityGenHandler.h

Go to the documentation of this file.
00001 /****************************************************************************/
00007 // The handler for parsing the statistics file.
00008 /****************************************************************************/
00009 // SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/
00010 // Copyright (C) 2001-2011 DLR (http://www.dlr.de/) and contributors
00011 // activitygen module
00012 // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/)
00013 /****************************************************************************/
00014 //
00015 //   This program is free software; you can redistribute it and/or modify
00016 //   it under the terms of the GNU General Public License as published by
00017 //   the Free Software Foundation; either version 2 of the License, or
00018 //   (at your option) any later version.
00019 //
00020 /****************************************************************************/
00021 #ifndef AGACTIVITYGENHANDLER_H
00022 #define AGACTIVITYGENHANDLER_H
00023 
00024 
00025 // ===========================================================================
00026 // included modules
00027 // ===========================================================================
00028 #ifdef _MSC_VER
00029 #include <windows_config.h>
00030 #else
00031 #include <config.h>
00032 #endif
00033 
00034 #include <string>
00035 #include <utils/xml/SUMOSAXHandler.h>
00036 #include <utils/common/UtilExceptions.h>
00037 #include "city/AGCity.h"
00038 #include "city/AGBusLine.h"
00039 
00040 
00041 // ===========================================================================
00042 // class declarations
00043 // ===========================================================================
00044 class RONet;
00045 
00046 
00047 // ===========================================================================
00048 // class definitions
00049 // ===========================================================================
00050 class AGActivityGenHandler : public SUMOSAXHandler {
00051 public:
00056     AGActivityGenHandler(AGCity& city, RONet* net);
00057 
00058 
00060     virtual ~AGActivityGenHandler() throw();
00061 
00062 
00063 protected:
00065 
00066 
00074     virtual void myStartElement(int element,
00075                                 const SUMOSAXAttributes& attrs) throw(ProcessError);
00077 
00078 protected:
00080 
00081 
00085     void parseGeneralCityInfo(const SUMOSAXAttributes& attrs);
00086     /*void parseInhabitants(const SUMOSAXAttributes &attrs);
00087     void parseHouseholds(const SUMOSAXAttributes &attrs);
00088     void parseChildrenAgeLimit(const SUMOSAXAttributes &attrs);
00089     void parseRetirementAgeLimit(const SUMOSAXAttributes &attrs);
00090     void parseCarRate(const SUMOSAXAttributes &attrs);
00091     void parseUnemployment(const SUMOSAXAttributes &attrs);
00092     void parseFootDistanceLimit(const SUMOSAXAttributes &attrs);
00093     void parseIncomingTraffic(const SUMOSAXAttributes &attrs);
00094     void parseOutgoingTraffic(const SUMOSAXAttributes &attrs);*/
00095 
00099     void parseParameters(const SUMOSAXAttributes& attrs);
00100 
00105     void parseStreets(const SUMOSAXAttributes& attrs);
00106 
00110     void parseCityGates(const SUMOSAXAttributes& attrs);
00111 
00115     void parseWorkHours();
00116     void parseOpeningHour(const SUMOSAXAttributes& attrs);
00117     void parseClosingHour(const SUMOSAXAttributes& attrs);
00118 
00122     void parseSchools();
00123     void parseSchool(const SUMOSAXAttributes& attrs);
00124 
00129     void parseBusStation(const SUMOSAXAttributes& attrs);
00130     void parseBusLine(const SUMOSAXAttributes& attrs);
00131     void parseStations();
00132     void parseRevStations();
00133     void parseStation(const SUMOSAXAttributes& attrs);
00134     void parseFrequency(const SUMOSAXAttributes& attrs);
00135 
00140     void parsePopulation();
00141     //void parseChildrenAccompaniment();
00142     void parseBracket(const SUMOSAXAttributes& attrs);
00143 
00144 
00145 protected:
00147     AGCity& myCity;
00148 
00150     std::string myCurrentObject;
00151     AGBusLine* currentBusLine;
00152 
00154     bool isRevStation;
00155 
00157     RONet* net;
00158 
00160     bool myProcess;
00161 
00162 
00163 private:
00165     AGActivityGenHandler(const AGActivityGenHandler& src);
00166 
00168     AGActivityGenHandler& operator=(const AGActivityGenHandler& src);
00169 
00170 };
00171 
00172 
00173 #endif
00174 
00175 /****************************************************************************/
00176 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Defines