12345678910111213141516171819202122232425262728293031 |
- #ifndef __SPECIAL_AREA_HPP
- #define __SPECIAL_AREA_HPP
- #include <map>
- #include <vector>
- #include "point.h"
- struct special_area_entry
- {
- special_area_entry(double x,double y,double z,double ex,double ey, double ez,int32_t areaid,std::string categoryid)
- :start_point(x,y,z)
- ,end_point(ex,ey,ez)
- ,special_area_id(areaid)
- ,car_type(categoryid)
- {}
- point start_point;
- point end_point;
- int special_area_id;
- std::string car_type;
- };
- struct special_area_list
- {
- std::vector<special_area_entry> m_v;
- std::map<uint32_t,std::vector<int32_t>> m_m;
- int32_t get_special_id(uint32_t cardid,const point p,int32_t categoryid);
- void init_from_db();
- void init_special_area_entry();
- void init_special_card();
- static special_area_list * instance();
- };
- #endif
|