score
Home
Classes
Namespaces
Files
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>
10
struct
DataStreamInput
;
11
struct
DataStreamOutput
;
12
13
namespace
Scenario
14
{
15
class
IntervalModel;
16
namespace
Command
17
{
23
class
SCORE_PLUGIN_SCENARIO_EXPORT
SetRigidity
final :
public
score::Command
24
{
25
SCORE_COMMAND_DECL(CommandFactoryName(),
SetRigidity
,
"Change interval rigidity"
)
26
27
public
:
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
33
protected
:
34
void
serializeImpl(
DataStreamInput
&)
const override
;
35
void
deserializeImpl(
DataStreamOutput
&)
override
;
36
37
private
:
38
Path<IntervalModel>
m_path;
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
}
Path
The Path class is a typesafe wrapper around ObjectPath.
Definition:
Path.hpp:52
Scenario::Command::SetRigidity
The SetRigidity class.
Definition:
SetRigidity.hpp:24
Scenario::IntervalModel
Definition:
IntervalModel.hpp:50
score::Command
The Command class.
Definition:
Command.hpp:34
Scenario
Main plug-in of score.
Definition:
score-plugin-dataflow/Dataflow/PortItem.hpp:14
DataStreamInput
Definition:
DataStreamHelpers.hpp:99
DataStreamOutput
Definition:
DataStreamHelpers.hpp:103
TimeVal
Definition:
TimeValue.hpp:21
score::DocumentContext
Definition:
DocumentContext.hpp:18