Go to the documentation of this file.
16 #include "src/data_structs.h"
18 class PassengerUnloader;
19 class PassengerLoader;
40 Bus(std::string name,
Route * out,
Route * in,
int capacity = 60,
60 void Report(std::ostream &out);
105 std::list<Passenger *> passengers_;
106 int passenger_max_capacity_;
109 Route * outgoing_route_;
110 Route * incoming_route_;
111 double distance_remaining_;
Structure for bus data used for visualization simulation.
Definition: data_structs.h:26
void UpdateBusData()
Method to update bus data.
Definition: bus.cc:98
The main class to define stop.
Definition: stop.h:22
size_t GetNumPassengers()
Getter of number of passengers on bus.
Definition: bus.cc:135
bool Move()
Method to decide if the bus is moving.
Definition: bus.cc:48
bool IsTripComplete()
Method to indicate if the bus complete all routes.
Definition: bus.cc:44
The main class to define bus.
Definition: bus.h:28
void Update()
Method to update the status of bus.
Definition: bus.cc:59
std::string GetName() const
Getter of bus name.
Definition: bus.cc:114
int UnloadPassengers(Stop *stop)
Method to unload passenger to a stop.
Definition: bus.cc:31
Stop * GetPreviousStop()
Getter of pointer to previous stop.
Definition: bus.cc:127
BusData GetBusData()
Getter of bus data.
Definition: bus.cc:110
Bus(std::string name, Route *out, Route *in, int capacity=60, double speed=1)
Constructs a bus with a standard name, two route pointers, passenger capacity and speed.
Definition: bus.cc:8
The main class to define route.
Definition: route.h:25
The main class to define passenger.
Definition: passenger.h:17
int GetCapacity()
Getter of pointer to bus capacity.
Definition: bus.cc:138
Stop * GetNextStop()
Getter of pointer to next stop.
Definition: bus.cc:118