#include <Detector.h>
Public Member Functions | |
void | setFileHandler (FileHandler *fh) |
Sets the detector's filehandler. | |
void | WriteVehiclesToFile () |
Writes the detector's vehicles to file. | |
bool | getDirection () |
Gets the direction of the detector. | |
void | clear () |
Clears all the detector's current vehicles. | |
int | getPos () |
Gets the position of the detector. | |
std::vector< Vehicle * > | getVehicles () |
Gets all the vehicles currently past the detector. | |
void | addVehicle (Vehicle *pVeh) |
Adds a vehicle to the detector. | |
Detector (int loc, bool DirPos, FileHandler *fh) | |
Constructor. | |
virtual | ~Detector () |
Default Desctructor. | |
Private Attributes | |
FileHandler * | m_pFileHandler |
int | m_Location |
bool | m_DirPos |
std::vector< Vehicle * > | m_Vehicles |
Detector::Detector | ( | int | loc, | |
bool | DirPos, | |||
FileHandler * | fh | |||
) |
Constructor.
loc | The location of the detector | |
DirPos | Whether or not the detector is in the positive direction | |
fh | The filehandler to use |
Detector::~Detector | ( | ) | [virtual] |
Default Desctructor.
void Detector::setFileHandler | ( | FileHandler * | fh | ) |
Sets the detector's filehandler.
fh | The filehandler to use |
void Detector::WriteVehiclesToFile | ( | ) |
Writes the detector's vehicles to file.
bool Detector::getDirection | ( | ) |
Gets the direction of the detector.
void Detector::clear | ( | ) |
Clears all the detector's current vehicles.
int Detector::getPos | ( | ) |
Gets the position of the detector.
std::vector< Vehicle * > Detector::getVehicles | ( | ) |
Gets all the vehicles currently past the detector.
void Detector::addVehicle | ( | Vehicle * | pVeh | ) |
Adds a vehicle to the detector.
pVeh | The vehicle to add |
FileHandler* Detector::m_pFileHandler [private] |
int Detector::m_Location [private] |
bool Detector::m_DirPos [private] |
std::vector<Vehicle*> Detector::m_Vehicles [private] |