00001 /****************************************************************************/ 00007 // Importer for network nodes stored in 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 NIXMLNodesHandler_h 00020 #define NIXMLNodesHandler_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/xml/SUMOSAXHandler.h> 00033 #include <utils/geom/Position2D.h> 00034 00035 00036 // =========================================================================== 00037 // class declarations 00038 // =========================================================================== 00039 class OptionsCont; 00040 class NBNode; 00041 class NBNodeCont; 00042 class NBTrafficLightLogicCont; 00043 00044 00045 // =========================================================================== 00046 // class definitions 00047 // =========================================================================== 00056 class NIXMLNodesHandler : public SUMOSAXHandler { 00057 00058 public: 00067 NIXMLNodesHandler(NBNodeCont &nc, NBTrafficLightLogicCont &tlc, 00068 OptionsCont &options); 00069 00070 00072 ~NIXMLNodesHandler() throw(); 00073 00074 00075 protected: 00077 00078 00091 void myStartElement(SumoXMLTag element, 00092 const SUMOSAXAttributes &attrs) throw(ProcessError); 00094 00095 00096 private: 00102 void processTrafficLightDefinitions(const SUMOSAXAttributes &attrs, 00103 NBNode *currentNode); 00104 00105 00106 private: 00108 OptionsCont &myOptions; 00109 00111 std::string myID; 00112 00114 Position2D myPosition; 00115 00117 NBNodeCont &myNodeCont; 00118 00120 NBTrafficLightLogicCont &myTLLogicCont; 00121 00122 00123 private: 00125 NIXMLNodesHandler(const NIXMLNodesHandler &s); 00126 00128 NIXMLNodesHandler &operator=(const NIXMLNodesHandler &s); 00129 00130 }; 00131 00132 00133 #endif 00134 00135 /****************************************************************************/ 00136
1.5.6