#include <FileReader.h>
Inheritance diagram for FileReader:
Public Member Functions | |
FileReader (string nfilename, MessageController *ptr) | |
~FileReader () | |
bool | sendMessage (shared_ptr< vector< shared_ptr< string > > > messagebody) |
Private Attributes | |
string | filename |
pthread_t | filereadthread |
bool | filereadthread_run |
MessageController * | msgcontroller |
Friends | |
void * | readFile (void *ptr) |
void * | flexRead (void *ptr) |
bool | send (char *) |
Definition at line 45 of file FileReader.h.
|
Constructor.
Definition at line 143 of file FileReader.cpp. References filename, filereadthread, filereadthread_run, flexRead, and msgcontroller. |
|
Definition at line 160 of file FileReader.cpp. References filereadthread, and filereadthread_run. |
|
Method used by the MessageController to send messages to Traplas. Obviously, when reading a file no messages can be sent. Therefore this method always returns false.
Implements Comm. Definition at line 168 of file FileReader.cpp. |
|
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. Referenced by FileReader(). |
|
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. |
|
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. |
|
Definition at line 47 of file FileReader.h. Referenced by FileReader(), flexRead(), and readFile(). |
|
Definition at line 49 of file FileReader.h. Referenced by FileReader(), and ~FileReader(). |
|
Definition at line 50 of file FileReader.h. Referenced by FileReader(), readFile(), and ~FileReader(). |
|
Definition at line 52 of file FileReader.h. Referenced by FileReader(), readFile(), and send(). |