FileHandler Class Reference

A base class for handling file input and output. More...

#include <FileHandler.h>

Inheritance diagram for FileHandler:

Inheritance graph
[legend]

List of all members.

Public Member Functions

std::vector< Truck * > loadTruckGroup (int no)
 Facilitates the buffering of a number of vehicles, rather than line by line input.
virtual void writeLine (Vehicle *pVeh)=0
virtual TruckreadLine ()=0
 FileHandler ()
 Default Constructor.
virtual ~FileHandler ()
 Default Destructor.

Protected Attributes

std::ifstream inFile
std::ofstream outFile
std::vector< Truck * > m_Trucks
char * pTruck
char singleTruck [78]


Detailed Description

A base class for handling file input and output.

Constructor & Destructor Documentation

FileHandler::FileHandler (  ) 

Default Constructor.

FileHandler::~FileHandler (  )  [virtual]

Default Destructor.


Member Function Documentation

std::vector< Truck * > FileHandler::loadTruckGroup ( int  no  ) 

Facilitates the buffering of a number of vehicles, rather than line by line input.

Parameters:
no The number of vehicles to buffer
Returns:
The buffer of vehicles

virtual void FileHandler::writeLine ( Vehicle pVeh  )  [pure virtual]

Implemented in CASTORFile, and SAFTFile.

virtual Truck* FileHandler::readLine (  )  [pure virtual]

Implemented in CASTORFile, and SAFTFile.


Member Data Documentation

std::ifstream FileHandler::inFile [protected]

std::ofstream FileHandler::outFile [protected]

std::vector<Truck*> FileHandler::m_Trucks [protected]

char* FileHandler::pTruck [protected]

char FileHandler::singleTruck[78] [protected]


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

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