FemMaps/map/SigalertRoadSection.cpp
2023-10-30 00:53:00 -07:00

32 lines
607 B
C++

//
// Created by scoliono on 10/14/23.
//
#include "SigalertRoadSection.h"
#include "SigalertRoad.h"
SigalertRoadSection::SigalertRoadSection(const SigalertRoadSectionJson& json, const SigalertRoad* road)
: m_road(road), m_sensor_idx_range{json.sensor_start_idx, json.sensor_end_idx}
{
if (json.dir == "North")
{
m_dir = NORTH;
}
else if (json.dir == "East")
{
m_dir = EAST;
}
else if (json.dir == "South")
{
m_dir = SOUTH;
}
else if (json.dir == "West")
{
m_dir = WEST;
}
else
{
m_dir = UNKNOWN;
}
}