SAFTFile Class Reference

A class for reading from, and writing to, SAFT format files. More...

#include <SAFTFile.h>

Inheritance diagram for SAFTFile:

Inheritance graph
[legend]
Collaboration diagram for SAFTFile:

Collaboration graph
[legend]

List of all members.

Public Member Functions

void writeLine (Vehicle *pVeh)
 Writes a line representing a truck to a SAFT file.
TruckreadLine ()
 Reads a line representing a truck from a SAFT file.
 SAFTFile (std::string inputFile, std::string outputFile)
 Constructor.
virtual ~SAFTFile ()
 Default destructor.


Detailed Description

A class for reading from, and writing to, SAFT format files.

Constructor & Destructor Documentation

SAFTFile::SAFTFile ( std::string  inputFile,
std::string  outputFile 
)

Constructor.

Parameters:
inputFile The file to read input from
outputFile The file to write output to

SAFTFile::~SAFTFile (  )  [virtual]

Default destructor.


Member Function Documentation

void SAFTFile::writeLine ( Vehicle pVeh  )  [virtual]

Writes a line representing a truck to a SAFT file.

Parameters:
pVeh The vehicle to write to file
This function takes a vehicle as a parameter, and calls this vehicle's doSAFTDATA function, in order to obtain a string which represents all of the vehicle's physical properties. It then writes this string to a SAFT format file

Implements FileHandler.

Truck * SAFTFile::readLine (  )  [virtual]

Reads a line representing a truck from a SAFT file.

Returns:
A newly created truck
This function reads the next line available from a SAFT format file and stores the information in a string. If the string is not null, a truck is created with the properties specified by the line from the file, and the truck is returned

Implements FileHandler.


The documentation for this class was generated from the following files:

Generated on Fri Jul 25 16:11:20 2008 for EvolveTraffic by  doxygen 1.5.6