Allows for grouping of multiple commands in a single one. More...

Inheritance diagram for score::AggregateCommand:
score::Command ControlSurface::AddControlMacro Dataflow::CreateModulation Explorer::Command::AddAddresses Explorer::Command::RemoveNodes Explorer::Command::UpdateAndReloadMacro JS::ScriptMacro Midi::RescaleAllMidi Nodal::DropNodesMacro Nodal::RemoveNodes Recording::Record Scenario::Command::AddMultipleProcessesToIntervalMacro Scenario::Command::AddMultipleProcessesToMultipleIntervalsMacro Scenario::Command::AddProcessInNewBoxMacro Scenario::Command::AddProcessInNewSlot Scenario::Command::AddStateWithData Scenario::Command::ClearSelection Scenario::Command::CreateProcessInExistingSlot Scenario::Command::CreateSequence Scenario::Command::CreateStateMacro Scenario::Command::CreationMetaCommand Scenario::Command::Decapsulate Scenario::Command::DropProcessInIntervalMacro Scenario::Command::DropProcessInStateMacro Scenario::Command::DuplicateProcess Scenario::Command::Encapsulate Scenario::Command::MergeEventMacro Scenario::Command::MoveIntervalMacro Scenario::Command::MoveStateMacro Scenario::Command::RefreshStatesMacro Scenario::Command::ReplaceAddresses Scenario::Command::ScenarioPasteContent Scenario::Command::SplitStateMacro Scenario::SnapshotStatesMacro YSFX::ScriptMacro

Detailed Description

Allows for grouping of multiple commands in a single one.

Useful for macros, meta-commands, etc.

Public Member Functions

template<typename T >
 AggregateCommand (T *cmd)
 
template<typename T , typename... Args>
 AggregateCommand (T *cmd, Args &&... remaining)
 
void undo (const score::DocumentContext &ctx) const override
 
void redo (const score::DocumentContext &ctx) const override
 
void addCommand (score::Command *cmd)
 Add a command to be redone after the others.
 
int count () const
 Number of commands in this aggregate.
 
const auto & commands () const
 
- Public Member Functions inherited from score::Command
virtual const CommandGroupKeyparentKey () const noexcept=0
 
virtual const CommandKeykey () const noexcept=0
 
QByteArray serialize () const
 
void deserialize (const QByteArray &)
 
virtual QString description () const =0
 

Protected Member Functions

void serializeImpl (DataStreamInput &) const override
 
void deserializeImpl (DataStreamOutput &) override
 

Protected Attributes

std::list< score::Command * > m_cmds
 

Constructor & Destructor Documentation

◆ AggregateCommand()

template<typename T , typename... Args>
score::AggregateCommand::AggregateCommand ( T *  cmd,
Args &&...  remaining 
)
inline

This constructor allows to pass a list of commands in argument.

e.g. new AggregateCommand{new MyCommand, new MySecondCommand, new MyThirdCommand};


The documentation for this class was generated from the following files: