Loading...
Searching...
No Matches
SetRigidity.hpp
1#pragma once
2#include <Process/TimeValue.hpp>
3
4#include <Scenario/Commands/ScenarioCommandFactory.hpp>
5
6#include <score/command/Command.hpp>
7#include <score/model/path/Path.hpp>
8
9#include <score_plugin_scenario_export.h>
10struct DataStreamInput;
11struct DataStreamOutput;
12
13namespace Scenario
14{
15class IntervalModel;
16namespace Command
17{
23class SCORE_PLUGIN_SCENARIO_EXPORT SetRigidity final : public score::Command
24{
25 SCORE_COMMAND_DECL(CommandFactoryName(), SetRigidity, "Change interval rigidity")
26
27public:
28 SetRigidity(const IntervalModel& interval, bool rigid);
29
30 void undo(const score::DocumentContext& ctx) const override;
31 void redo(const score::DocumentContext& ctx) const override;
32
33protected:
34 void serializeImpl(DataStreamInput&) const override;
35 void deserializeImpl(DataStreamOutput&) override;
36
37private:
39 // Unused if the interval was rigid // NOTE Why ??
40 TimeVal m_oldMinDuration;
41 TimeVal m_oldMaxDuration;
42
43 bool m_rigidity{}, m_oldRigidity{}, m_oldIsNull{}, m_oldIsInfinite{};
44};
45}
46}
The Path class is a typesafe wrapper around ObjectPath.
Definition Path.hpp:52
The SetRigidity class.
Definition SetRigidity.hpp:24
Definition IntervalModel.hpp:50
The Command class.
Definition Command.hpp:34
Main plug-in of score.
Definition score-plugin-dataflow/Dataflow/PortItem.hpp:13
Definition DataStreamHelpers.hpp:99
Definition DataStreamHelpers.hpp:103
Definition TimeValue.hpp:21
Definition DocumentContext.hpp:18