#include <vector>
#include <string>
#include <queue>
#include <sstream>
#include <fstream>
#include <iostream>
#include "FileReader.h"
#include "MessageController.h"
#include "lex.yy.c"
Include dependency graph for FileReader.cpp:
Go to the source code of this file.
Functions | |
void | Tokenize (const string &str, shared_ptr< vector< shared_ptr< string > > > tokens, const string &delimiters=" ") |
bool | send (char *line) |
void * | flexRead (void *ptr) |
void * | readFile (void *ptr) |
Variables | |
FileReader * | myr |
|
Thread to read the input file generated by Traplas containing a simulation. This thread uses flex to process the input file. Entire messages are matched, then these messages are sent to the MessageController. When a line in the inputfile is not recognised, a message is send to cout containing the linenumber and the unrecognised message itself. Definition at line 89 of file FileReader.cpp. References FileReader::filename. |
|
Thread to read the input file generated by Traplas containing a simulation. This thread uses a simple way the read a file, it offers no checks whatsoever on what it reads. It just reads lines using a getline(), then it makes token using a space(" ") as delimiter. Then it sends the messages to the MessageController. Definition at line 100 of file FileReader.cpp. References FileReader::filename, FileReader::filereadthread_run, FileReader::msgcontroller, MessageController::processMessageFromComm(), and Tokenize(). Here is the call graph for this function: ![]() |
|
Helper function for yylex() to send messages to the MessageController. It sends the message to the MessageController. Definition at line 73 of file FileReader.cpp. References FileReader::msgcontroller, MessageController::processMessageFromComm(), and Tokenize(). Here is the call graph for this function: ![]() |
|
Definition at line 49 of file FileReader.cpp. Referenced by readFile(), and send(). |
|
Definition at line 71 of file FileReader.cpp. |