elementFindingHelper.hpp
1 #pragma once
2 
3 #include <Process/TimeValue.hpp>
4 
5 #include <Scenario/Process/ScenarioModel.hpp>
6 namespace Scenario
7 {
8 inline TimeVal
9 getDate(const Scenario::ProcessModel& scenario, const Id<StateModel>& state)
10 {
11  return scenario.timeSyncs
12  .at(scenario.events.at(scenario.states.at(state).eventId()).timeSync())
13  .date();
14 }
15 
16 inline TimeVal
17 getDate(const Scenario::ProcessModel& scenario, const Id<EventModel>& event)
18 {
19  return scenario.timeSyncs.at(scenario.events.at(event).timeSync()).date();
20 }
21 
22 inline TimeVal
23 getDate(const Scenario::ProcessModel& scenario, const Id<TimeSyncModel>& timesync)
24 {
25  return scenario.timeSyncs.at(timesync).date();
26 }
27 }
The core hierarchical and temporal process of score.
Definition: ScenarioModel.hpp:37
The id_base_t class.
Definition: Identifier.hpp:57
Main plug-in of score.
Definition: score-plugin-dataflow/Dataflow/PortItem.hpp:14
Definition: TimeValue.hpp:21