| Revision 233,
1.1 KB
checked in by jtorres, 8 years ago
(diff) |
|
FEPSim: finalized comments, added to both header and source files.
|
| Rev | Line | |
|---|
| 1 | /* |
|---|
| 2 | * File: HighwaysParser.h |
|---|
| 3 | * |
|---|
| 4 | * The HighwaysParser class takes in a character buffer and parses it into a |
|---|
| 5 | * vector of FEP_LINEs and a vector of STATIONS. The buffer is sent in via the |
|---|
| 6 | * constructor and the FEP_LINE and STATION vectors are accessible via public |
|---|
| 7 | * members. |
|---|
| 8 | * |
|---|
| 9 | * @author John A. Torres |
|---|
| 10 | */ |
|---|
| 11 | |
|---|
| 12 | #ifndef HIGHWAYSPARSER_H |
|---|
| 13 | #define HIGHWAYSPARSER_H |
|---|
| 14 | |
|---|
| 15 | #include "network.h" |
|---|
| 16 | #include <vector> |
|---|
| 17 | #include <iostream> |
|---|
| 18 | #include <sstream> |
|---|
| 19 | #include <stdio.h> |
|---|
| 20 | #include "DataPacker.h" |
|---|
| 21 | |
|---|
| 22 | class HighwaysParser { |
|---|
| 23 | public: |
|---|
| 24 | /** |
|---|
| 25 | * Constructor. Takes in the character buffer to be parsed. |
|---|
| 26 | * |
|---|
| 27 | * @param highwaysData buffer |
|---|
| 28 | */ |
|---|
| 29 | HighwaysParser(char * highwaysData); |
|---|
| 30 | /** |
|---|
| 31 | * Parses the buffer into FEP_LINE and STATION vectors. |
|---|
| 32 | * |
|---|
| 33 | * @param highwaysData buffer |
|---|
| 34 | */ |
|---|
| 35 | void parseLines(char * highwaysData); |
|---|
| 36 | // The public lines member, containing the parsed vector of FEP_LINES |
|---|
| 37 | vector<FEP_LINE*> lines; |
|---|
| 38 | // The public stations member, containing the parsed vector of STATIONS |
|---|
| 39 | vector<STATION*> stations; |
|---|
| 40 | // Frees all allocated memory in the class |
|---|
| 41 | virtual ~HighwaysParser(); |
|---|
| 42 | private: |
|---|
| 43 | }; |
|---|
| 44 | |
|---|
| 45 | #endif /* HIGHWAYSPARSER_H */ |
|---|
| 46 | |
|---|
Note: See
TracBrowser
for help on using the repository browser.