3 #include <State/Expression.hpp>
5 #include <Scenario/Commands/Interval/SetRigidity.hpp>
6 #include <Scenario/Commands/ScenarioCommandFactory.hpp>
7 #include <Scenario/Document/TimeSync/TimeSyncModel.hpp>
9 #include <score/command/Command.hpp>
10 #include <score/document/DocumentInterface.hpp>
11 #include <score/model/path/Path.hpp>
19 template <
typename Scenario_T>
25 return ::CommandFactoryName<Scenario_T>();
27 const CommandKey& key()
const noexcept
override {
return static_key(); }
28 QString description()
const override {
return QObject::tr(
"Add a trigger"); }
41 Scenario_T* scenar = safe_cast<Scenario_T*>(tn.parent());
42 for(
const auto& cstrId : intervalsBeforeTimeSync(*scenar, tn.id()))
44 m_cmds.emplace_back(scenar->interval(cstrId),
false);
50 auto& tn = m_path.find(ctx);
53 for(
const auto& cmd : m_cmds)
61 auto& tn = m_path.find(ctx);
64 for(
const auto& cmd : m_cmds)
74 s << (int32_t)m_cmds.size();
76 for(
const auto& cmd : m_cmds)
88 for(
int i = 0; i < n; i++)
92 m_cmds[i].deserialize(a);
98 std::vector<SetRigidity> m_cmds;
103 #include <Scenario/Process/ScenarioModel.hpp>
106 #include <Scenario/Document/BaseScenario/BaseScenario.hpp>
The Path class is a typesafe wrapper around ObjectPath.
Definition: Path.hpp:52
Definition: AddTrigger.hpp:21
Definition: TimeSyncModel.hpp:34
The Command class.
Definition: Command.hpp:34
Main plug-in of score.
Definition: score-plugin-dataflow/Dataflow/PortItem.hpp:14
Definition: DataStreamHelpers.hpp:103
Definition: DocumentContext.hpp:18