1
0

special_area.h 764 B

12345678910111213141516171819202122232425262728293031
  1. #ifndef __SPECIAL_AREA_HPP
  2. #define __SPECIAL_AREA_HPP
  3. #include <map>
  4. #include <vector>
  5. #include "point.h"
  6. struct special_area_entry
  7. {
  8. special_area_entry(double x,double y,double z,double ex,double ey, double ez,int32_t areaid,std::string categoryid)
  9. :start_point(x,y,z)
  10. ,end_point(ex,ey,ez)
  11. ,special_area_id(areaid)
  12. ,car_type(categoryid)
  13. {}
  14. point start_point;
  15. point end_point;
  16. int special_area_id;
  17. std::string car_type;
  18. };
  19. struct special_area_list
  20. {
  21. std::vector<special_area_entry> m_v;
  22. std::map<uint32_t,std::vector<int32_t>> m_m;
  23. int32_t get_special_id(uint32_t cardid,const point p,int32_t categoryid);
  24. void init_from_db();
  25. void init_special_area_entry();
  26. void init_special_card();
  27. static special_area_list * instance();
  28. };
  29. #endif