// // Created by scoliono on 10/14/23. // #ifndef FEMMAPS_SIGALERTROAD_H #define FEMMAPS_SIGALERTROAD_H #include "Road.h" #include "RoadSensor.h" #include "SigalertTypes.h" #include "../include/IntervalTree.h" #include "../include/json.hpp" #include #include class SigalertRoadSection; class SigalertRoadSensor; class SigalertRoad : public Road { public: SigalertRoad(int id, const SigalertRoadJson& json); inline int id() const { return m_id; } inline const char* name() const { return m_name.c_str(); } inline const std::vector& sections() const { return m_sections; } inline const std::vector& sensors() const { return m_sensors; } inline const IntervalTree& speedLimits() const { return m_sensor_speedlimits; } void addSection(SigalertRoadSection* section); void populateSensors(const std::vector& sensors); private: int m_id; std::string m_name; std::vector m_sections; int m_section_idx_range[2]; std::vector m_sensors; IntervalTree m_sensor_speedlimits; }; #endif //FEMMAPS_SIGALERTROAD_H