[traffxml] Parse duration quantifier and use it for delays

Signed-off-by: mvglasow <michael -at- vonglasow.com>
This commit is contained in:
mvglasow
2025-06-09 21:56:06 +03:00
parent b98fe1999c
commit b48310e6a5
3 changed files with 88 additions and 5 deletions

View File

@@ -109,6 +109,19 @@ enum class RoadClass
Other
};
enum class QuantifierType
{
Dimension,
Duration,
Int,
Ints,
Speed,
Temperature,
Time,
Weight,
Invalid
};
/*
* When adding a new event class to this enum, be sure to do the following:
*
@@ -312,7 +325,17 @@ struct TraffEvent
EventType m_type = EventType::Invalid;
std::optional<uint8_t> m_length;
std::optional<uint8_t> m_probability;
// TODO optional quantifier
std::optional<uint16_t> m_qDurationMins;
/*
* TODO remaining quantifiers
* q_dimension
* q_int
* q_ints
* q_speed
* q_temperature
* q_time
* q_weight
*/
std::optional<uint8_t> m_speed;
// TODO supplementary information
};