37 lines
877 B
C++
37 lines
877 B
C++
//
|
|
// Created by scoliono on 10/14/23.
|
|
//
|
|
|
|
#ifndef FEMMAPS_SIGALERTROADSENSOR_H
|
|
#define FEMMAPS_SIGALERTROADSENSOR_H
|
|
|
|
#include "Road.h"
|
|
#include "RoadSensor.h"
|
|
#include "SigalertRoad.h"
|
|
#include <string>
|
|
|
|
|
|
class SigalertRoadSensor : public RoadSensor {
|
|
|
|
public:
|
|
SigalertRoadSensor(const int id, const std::string& name, const std::vector<int>& pos, int speed);
|
|
virtual ~SigalertRoadSensor();
|
|
inline const Road* road() { return static_cast<const Road*>(m_road); }
|
|
inline void setRoad(const SigalertRoad* road) { m_road = road; }
|
|
inline const char* name() { return m_name.c_str(); }
|
|
inline const int* pos() { return m_pos; }
|
|
inline int speed() { return m_speed; }
|
|
int speedLimit();
|
|
|
|
private:
|
|
int m_id;
|
|
const SigalertRoad* m_road;
|
|
std::string m_name;
|
|
const int m_pos[2];
|
|
int m_speed;
|
|
|
|
};
|
|
|
|
|
|
#endif //FEMMAPS_SIGALERTROADSENSOR_H
|