48 std::cout <<
"Trip: " << std::endl;
49 std::cout <<
"\t-From= ";
51 std::cout <<
"\t-To= ";
53 std::cout <<
"\t-At= " <<
myDepTime <<
" -Day= " <<
myDay << std::endl;
54 std::cout <<
"\t-Vehicle= " <<
myVehicle << std::endl;
55 std::cout <<
"\t-type= " <<
myType << std::endl;
65 std::list<AGPosition>::iterator it;
74 std::list<AGPosition>::iterator it;
80const std::list<AGPosition>*
113 std::list<AGPosition> positions;
114 positions.push_back(
myFrom);
115 std::list<AGPosition>::const_iterator it;
117 positions.push_back(*it);
119 positions.push_back(
myTo);
122 for (it = positions.begin(), ++it; it != positions.end(); ++it) {
126 return (
int)(secPerKm * (dist / 1000.0));
A location in the 2D plane freely positioned on a street.
double getPosition() const
Provides the relative position of this AGPosition on the street.
double distanceTo(const AGPosition &otherPos) const
Computes the distance between two AGPosition objects.
const AGStreet & getStreet() const
Provides the street this AGPosition is located on.
void print() const
Prints out a summary of the properties of this class on standard output.
void setDep(AGPosition departure)
void setVehicleName(std::string name)
const std::list< AGPosition > * getPassed() const
int getTimeTrip(double secPerKm) const
AGPosition getDep() const
void setArr(AGPosition arrival)
void setDepTime(int time)
int getRideBackArrTime(double secPerKm) const
void addLayOverWithoutDestination(AGTrip &trip)
void setType(std::string type)
const std::string & getType() const
bool operator<(const AGTrip &trip) const
AGPosition getArr() const
std::list< AGPosition > myPassBy
void addLayOver(AGPosition by)
int getArrTime(double secPerKm) const
int estimateDepTime(int arrTime, double secPerKm) const
const std::string & getVehicleName() const