// lane.h for traffic simulation #ifndef LANE_H_ #define LANE_H_ #include "simulation.h" #include "vehicle.h" class lane { public: lane(void): id(0), position_x(0.0), position_y(0.0), speed_limit(0.0), moving(north), length(0.0), signal(none), vehicle_list(0) {}; lane(float Aposition_x, float Aposition_y, float Aspeed_limit, direction Amoving, float Alength); void operate(void); void vehicle_start(float Alength, float Aweight, float Aaccel, float Adecell); bool vehicle_exiting( void ); vehicle * vehicle_remove( void ); void vehicle_add( vehicle *a_vehicle ); void lane_end( float & x_lane_end, float & y_lane_end); void set_signal(signal_state Asignal); void draw(void); private: int id; float position_x; float position_y; float speed_limit; direction moving; float length; signal_state signal; vehicle *vehicle_list; }; // end lane.h #endif // LANE_H_