dataStructures.hpp
1 #pragma once
2 
3 /*
4 This file is used to define simple data structure to simplify the code when
5 needed
6 */
7 
8 #include <Process/TimeValue.hpp>
9 
10 #include <Scenario/Document/Event/ExecutionStatus.hpp>
11 
12 #include <Dataflow/Commands/CableHelpers.hpp>
13 
14 #include <score/model/Identifier.hpp>
15 #include <score/model/path/Path.hpp>
16 #include <score/tools/std/HashMap.hpp>
17 
18 #include <QByteArray>
19 
20 #include <score_plugin_scenario_export.h>
21 
22 namespace Scenario
23 {
24 class IntervalModel;
25 class TimeSyncModel;
26 
28 {
29  TimeVal oldDate{};
30  TimeVal newDate{};
31  double date{};
32 
33  double date_min{};
34  double date_max{};
35 
36  ExecutionStatus status{ExecutionStatus::Editing};
37 };
38 
39 struct SCORE_PLUGIN_SCENARIO_EXPORT IntervalSaveData
40 {
41  IntervalSaveData() = default;
42  IntervalSaveData(const IntervalModel&, bool saveIntemporal);
43 
44  void reload(IntervalModel&) const;
45 
46  Path<IntervalModel> intervalPath;
47  std::vector<QByteArray> processes;
48  std::vector<QByteArray> racks;
49 };
50 
52 {
53  using IntervalSaveData::IntervalSaveData;
54 
55  TimeVal oldDate{};
56  TimeVal oldDefault{};
57  TimeVal oldMin{};
58  TimeVal newMin{};
59  TimeVal oldMax{};
60  TimeVal newMax{};
61  ExecutionStatus status{ExecutionStatus::Editing};
62 };
63 
65 {
66  score::hash_map<Id<TimeSyncModel>, TimenodeProperties> timesyncs;
67  score::hash_map<Id<IntervalModel>, IntervalProperties> intervals;
68 
69  Dataflow::SerializedCables cables;
70 };
71 }
The Path class is a typesafe wrapper around ObjectPath.
Definition: Path.hpp:52
Definition: IntervalModel.hpp:50
Main plug-in of score.
Definition: score-plugin-dataflow/Dataflow/PortItem.hpp:14
Definition: dataStructures.hpp:65
Definition: dataStructures.hpp:52
Definition: dataStructures.hpp:40
Definition: dataStructures.hpp:28
Definition: TimeValue.hpp:21