#ifndef __JFXMAP_MAPINTERFACE_HPP_
#define __JFXMAP_MAPINTERFACE_HPP_

#include "MapApi.hpp"

namespace jf {
enum class LaneType {
    NotInvestigated = 0,         // 未调查
    NormalLane = 1,              // 普通车道
    EnterLane = 2,               // 入口车道
    ExitLane = 3,                // 出口车道
    ConnectLane = 4,             // 连接车道
    EmergencyLane = 5,           // 应急车道
    StopLane = 6,                // 停车道
    EmergencyStopLane = 7,       // 紧急停车道
    AcceleratingLane = 8,        // 加速车道
    DeceleratingLane = 9,        // 减速车道
    HazardLane = 10,             // 避险车道
    JunctionLane = 11,           // 路口车道
    TollStationLane = 12,        // 收费站车道
    CheckpointLane = 13,         // 检查站车道
    UTurnLane = 14,              // 掉头车道
    BusLane = 15,                // 公交车道
    TidalLane = 16,              // 潮汐(可变) 车道
    LocomotiveLane = 17,         // 机车车道
    LocomotiveParkingArea = 18,  // 机车停车区
    HOVHighLoadLane = 19,        // HOV 高承载车道
    NonMotorizedLane = 30,       // 非机动车道
    Sidewalk = 40,               // 人行道
    Ohters = 99,                 // 其它车道
};

enum class EdgeCrossType {
    NotInvestigated = 0,  // 未调查
    Unable = 1,           // 无法跨越
    BidirecAble = 2,      // 双方向跨越
    LeftAble = 3,         // 向左跨越
    RightAble = 4,        // 向右跨越
};

class MapInterface {
   public:
    MapInterface(const std::string &strPrjPath, const std::string strCfgPath);
    ~MapInterface();

   public:
    bool GetMapData(const Point &ptInLoc, double dCarAngle, int &nOutLaneCnt, int &nOutLaneNum, LaneType &nOutLaneType, EdgeCrossType &nOutLeftEdgeCrossType, EdgeCrossType &nOutRightEdgeCrossType, int &nOutSpeedLimit, double &dOutLaneAngle,
                    Point &ptOutFoot);
    bool GetMapData(const Point &ptInLoc, double dCarAngle, long &lOutRaodId, std::vector<long> &vctlOutPreRoadId, std::vector<long> &vctlOutNxtRoadId, int &nLaneCnt, int &nOutLaneNum, LaneType &nOutLaneType, EdgeCrossType &nOutLeftEdgeCrossType,
                    EdgeCrossType &nOutRightEdgeCrossType, int &nOutSpeedLimit, double &dOutLaneAngle, Point &ptOutFoot);

   private:
    MapLib m_mlMapLib;
};
}  // namespace jf

#endif