Changeset 86 in tmcsimulator for branches/FEPSimulator/NetworkReader.h
- Timestamp:
- 10/09/2017 11:58:19 PM (9 years ago)
- File:
-
- 1 edited
-
branches/FEPSimulator/NetworkReader.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/FEPSimulator/NetworkReader.h
r80 r86 58 58 #include "DataPacker.h" 59 59 60 class NetworkReader 61 { 62 public: 63 NetworkReader(const char * networkFile); // Constructor 64 ~NetworkReader(); // Destructor 65 66 vector<FEP_LINE*> getLines(); // Getter for FEP_LINE list 67 vector<STATION*> getStations(); // Getter for STATION list 68 private: 69 vector<FEP_LINE*> lines; 70 vector<STATION*> stations; 71 int ldsIndex; 72 73 void loadLines(const char * networkFileName); 74 LOOP * parseLoop(TiXmlElement * loopElem); 75 STATION * parseStation(TiXmlElement *stationElem, FEP_LINE *line); 76 FEP_LINE * parseLine(TiXmlElement *lineElem); 60 class NetworkReader { 61 public: 62 /** 63 * Constructor 64 * @param xml Highway Status XML data 65 */ 66 NetworkReader(const char * xml); 67 68 /** 69 * Destructor: no cleaning necessary 70 */ 71 ~NetworkReader(); 72 73 /** 74 * Returns FEP_LINE list. 75 * 76 * @return List of FEP_LINES 77 */ 78 vector<FEP_LINE*> getLines(); 79 80 /** 81 * Returns STATIONS list. 82 * @return List of STATIONs 83 */ 84 vector<STATION*> getStations(); 85 86 private: 87 vector<FEP_LINE*> lines; 88 vector<STATION*> stations; 89 int ldsIndex; 90 91 /** 92 * Loads Highway Status data from xml. 93 * 94 * @param xml Highway Status XML. 95 */ 96 void loadLines(const char * networkFileName); 97 98 /** 99 * Parses a single LOOP 100 * @param loopElem TinyXML loop elem 101 * @return LOOP 102 */ 103 LOOP * parseLoop(TiXmlElement * loopElem); 104 105 /** 106 * Parses a single STATION 107 * 108 * @param TinyXML station element 109 * @param the parent FEP_LINE 110 * @return STATION 111 */ 112 STATION * parseStation(TiXmlElement *stationElem, FEP_LINE *line); 113 114 /** 115 * Parses a single FEP_LINE 116 * @param TinyXML line element 117 * @return FEP_LINE 118 */ 119 FEP_LINE * parseLine(TiXmlElement *lineElem); 77 120 }; 78 121
Note: See TracChangeset
for help on using the changeset viewer.
