score::AggregateCommand Class Reference
Allows for grouping of multiple commands in a single one. More...
Inheritance diagram for score::AggregateCommand:
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 CommandGroupKey & | parentKey () const noexcept=0 |
virtual const CommandKey & | key () 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>
|
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:
- AggregateCommand.hpp
- AggregateCommand.cpp