#include <fileparser.h>
|
void | setPattern (QList< QString >) |
|
template<typename TYPE > |
bool | read (QString filename, TYPE &list) |
|
FileParser reads an input stream from a given file location and tries to parse it to different data structures acoording to the structure it gets passed as an argument.
bool FileParser::parseFromString |
( |
QList< Airport * > & |
list, |
|
|
QString |
line |
|
) |
| |
|
protected |
Parsing a single line from the instream into a List of objects of type <Airport>
- Parameters
-
list | QList of Airport objects. The data structure to be written into. |
line | The line to be parsed. |
- Returns
- boolean value that indicates the success of the file reading process.
bool FileParser::parseFromString |
( |
QList< Route * > & |
list, |
|
|
QString |
line |
|
) |
| |
|
protected |
Parsing a single line from the instream into a List of objects of type <Route>
- Parameters
-
list | QList of Route objects. The data structure to be written into. |
line | The line to be parsed. |
- Returns
- boolean value that indicates the success of the file reading process.
bool FileParser::parseFromString |
( |
QMap< QString, int > & |
map, |
|
|
QString |
line |
|
) |
| |
|
protected |
Parsing a single line from the instream into a QMap objects of type <QString, int>
- Parameters
-
list | QMap of objects. The data structure to be written into. |
line | The line to be parsed. |
- Returns
- boolean value that indicates the success of the file reading process.
bool FileParser::parseFromString |
( |
QMap< int, int > & |
map, |
|
|
QString |
line |
|
) |
| |
|
protected |
Parsing a single line from the instream into a QMap objects of type <int, int>
- Parameters
-
list | QMap of objects. The data structure to be written into. |
line | The line to be parsed. |
- Returns
- boolean value that indicates the success of the file reading process.
template<typename TYPE >
template bool FileParser::read< QMap< int, int > > |
( |
QString |
filename, |
|
|
TYPE & |
list |
|
) |
| |
read opens a file for the given filename and exports the containing data line by line into the list of the type TYPE passed as an argument
- Parameters
-
filename | The filename in a QString representation |
list | The data structure to be written into. Several types of list are allowed. |
- Returns
- boolean value that indicates the success of the file reading process.
The documentation for this class was generated from the following files: