#ifndef __LAND_MARK_HPP__ #define __LAND_MARK_HPP__ #include #include #include #include #include #include #include "write-copy.h" #include "point.h" enum DIRECTION_TYPE{ NODIRECTORY = 0, EAST = 1, SOURTH = 2, WEST = 3, NORTH = 4 }; struct LandmarkInfo:point { LandmarkInfo() :landmark_id(0) ,landmark_name("") ,map_id(0) ,area_id(0) {} LandmarkInfo(point &p,int id,std::string & n,int mapid, int areaid) :point(p) ,landmark_id(id) ,landmark_name(n) ,map_id(mapid) ,area_id(areaid) {} int landmark_id; std::string landmark_name; int map_id; int area_id; }; struct map_direction { map_direction(int mapid,int angle) :map_id(mapid) ,north_angle(angle) {} int map_id; int north_angle; }; struct Landmark_list:single_base> { //std::vector> m_v; std::map> m_map_direction; //static Landmark_list * instance(); void init_from_db(); void init_landmarkInfo(int id = -1); void init_mapDirection(); //landmarkId landmark_direction landmark_dis std::tuple get_landmark(int mapid,int areaid,const point &pt); DIRECTION_TYPE GetDirectionType(point card_point, point landmark_point, int map_id); std::mutex m_mutex; }; #endif