#include <Truck.h>
Public Member Functions | |
void | doSAFTData (char *pTruck) |
Prepares a truck for printing to a SAFT file. | |
void | doCASTORData (char *pTruck) |
Prepares a truck for printing to a CASTOR file. | |
void | createSAFTTruck (std::string data) |
Creates a truck from a given SAFT string. | |
void | createCASTORTruck (std::string data) |
Creates a truck from a given CASTOR string. | |
void | setDriver () |
void | setNoAxles (int axNo) |
Sets the truck's number of axles to a given number. | |
void | setGVW (double weight) |
Sets the GVW of the truck to a given weight. | |
Truck () | |
Default constructor. | |
virtual | ~Truck () |
Default destructor. | |
void | setAW (int i, double w) |
Sets the weight of a given axle. | |
void | setAS (int i, double s) |
Sets the spacing of a given axle. | |
double | getGVW () |
Gets the GVW of the truck. | |
int | getNoAxles () |
Gets the truck's number of axles. | |
double | getAS (int i) |
Gets the spacing of a given axle. | |
double | getAW (int i) |
Gets the weight of a given axle. | |
bool | operator== (Truck &x) |
bool | operator< (const Truck &x) |
double | getTime () const |
Gets the current time of the truck in seconds. | |
void | returnTruckData (int truckData[]) |
Parses the Truck's data into an array. | |
Private Attributes | |
std::vector< Axle * > | axles |
int | noAxles |
double | overhangFront |
double | overhangBack |
double | GVW |
int | hour |
int | min |
int | sec |
int | hndt |
int | day |
int | month |
int | year |
int | trns |
int | TimeMod |
int | head |
int | order |
int | dir |
Truck::Truck | ( | ) |
Default constructor.
Default Constructor.
Truck::~Truck | ( | ) | [virtual] |
Default destructor.
Default Destructor.
void Truck::doSAFTData | ( | char * | pTruck | ) | [virtual] |
Prepares a truck for printing to a SAFT file.
pTruck | The string of data to represent the truck |
Reimplemented from Vehicle.
void Truck::doCASTORData | ( | char * | pTruck | ) | [virtual] |
Prepares a truck for printing to a CASTOR file.
pTruck | The string of data to represent the truck |
Reimplemented from Vehicle.
void Truck::createSAFTTruck | ( | std::string | data | ) |
Creates a truck from a given SAFT string.
data | The SAFT string of data |
void Truck::createCASTORTruck | ( | std::string | data | ) |
Creates a truck from a given CASTOR string.
data | The CASTOR string of data |
void Truck::setDriver | ( | ) |
void Truck::setNoAxles | ( | int | axNo | ) |
Sets the truck's number of axles to a given number.
axNo | the desired number of axles |
void Truck::setGVW | ( | double | weight | ) |
Sets the GVW of the truck to a given weight.
weight | the desired GVW |
void Truck::setAW | ( | int | i, | |
double | w | |||
) |
Sets the weight of a given axle.
i | the axle to operate upon | |
w | the desired weight |
void Truck::setAS | ( | int | i, | |
double | s | |||
) |
Sets the spacing of a given axle.
The space of a given axle to the next axle
i | the axle to operate upon | |
s | the desired spacing |
double Truck::getGVW | ( | ) |
Gets the GVW of the truck.
int Truck::getNoAxles | ( | ) |
Gets the truck's number of axles.
double Truck::getAS | ( | int | i | ) |
Gets the spacing of a given axle.
The space of a given axle to the next axle
i | the axle to operate upon |
double Truck::getAW | ( | int | i | ) |
Gets the weight of a given axle.
i | the axle to operate upon |
bool Truck::operator== | ( | Truck & | x | ) |
bool Truck::operator< | ( | const Truck & | x | ) |
double Truck::getTime | ( | ) | const |
Gets the current time of the truck in seconds.
void Truck::returnTruckData | ( | int | truckData[] | ) |
Parses the Truck's data into an array.
std::vector<Axle*> Truck::axles [private] |
int Truck::noAxles [private] |
double Truck::overhangFront [private] |
double Truck::overhangBack [private] |
double Truck::GVW [private] |
int Truck::hour [private] |
int Truck::min [private] |
int Truck::sec [private] |
int Truck::hndt [private] |
int Truck::day [private] |
int Truck::month [private] |
int Truck::year [private] |
int Truck::trns [private] |
int Truck::TimeMod [private] |
int Truck::head [private] |
int Truck::order [private] |
int Truck::dir [private] |