CASTORFile Class Reference

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

#include <CASTORFile.h>

Inheritance diagram for CASTORFile:

Inheritance graph
[legend]
Collaboration diagram for CASTORFile:

Collaboration graph
[legend]

List of all members.

Public Member Functions

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


Detailed Description

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

Constructor & Destructor Documentation

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

Constructor.

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

CASTORFile::~CASTORFile (  )  [virtual]

Default Destructor.


Member Function Documentation

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

Writes a line representing a truck to a CASTOR file.

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

Implements FileHandler.

Truck * CASTORFile::readLine (  )  [virtual]

Reads a line representing a truck from a CASTOR file.

Returns:
A newly created truck
This function reads the next line available from a CASTOR 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:11 2008 for EvolveTraffic by  doxygen 1.5.6