// // 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; } }