123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- #ifndef _card_car_h_
- #define _card_car_h_
- #include <string>
- #include <memory>
- #include "point.h"
- #include "card_base.h"
- #include "card_area.h"
- struct area_hover;
- struct mine_tool;
- struct site;
- struct site_area_hover;
- struct loc_point;
- struct car:card_location_base,card_area
- {
- int m_vehicle_category_id = 0;
- int m_vehicle_type_id = 0;
- boost::circular_buffer<double> m_speeds;
- public:
- car(const std::string&type,uint32_t cardid,uint16_t needdisplay,int16_t t,int32_t deptid,
- int32_t categoryid, int type_id,int32_t level_id,uint32_t cid);
- ~car();
- virtual std::shared_ptr<mine_tool> get_mine_tool();
- virtual void do_business(const std::shared_ptr<site>&site,const point &pt,double acc);
- virtual int get_area();
- int get_vehicle_type_id();
- virtual std::shared_ptr<area_tool> get_area_tool()
- {
- return m_area_tool;
- }
- virtual int get_vehicle_category_id()
- {
- return m_vehicle_category_id;
- }
- virtual void set_area_info(int mapid,double scale,int areaid,uint64_t t,int type);
- virtual void get_card(bool);
- private:
- void handle_three_rates(const point &pt);
- void handle_traffic_light(const point& pt, const int& sid);
- void handle_anti_coll(const point& pt, const int& sid);
- void handle_over_speed();
- void on_timer();
- void make_package();
- loc_point getSmoothPoint();
- };
- #endif
|