GenericCommand is a Command that can be constructed directly using lambdas, without having to create a subclass.
More...
#include <Command.h>
GenericCommand is a Command that can be constructed directly using lambdas, without having to create a subclass.
Best for commands invoked only in a single place, and where little state is involved.
Definition at line 41 of file Command.h.
GenericCommand::GenericCommand |
( |
QString |
name, |
|
|
std::function< void()> |
execute, |
|
|
std::function< void()> |
unexecute |
|
) |
| |
|
inline |
GenericCommand::GenericCommand |
( |
QString |
name, |
|
|
std::function< void()> |
execute, |
|
|
std::function< void()> |
unexecute, |
|
|
std::function< void()> |
onDelete |
|
) |
| |
|
inline |
virtual GenericCommand::~GenericCommand |
( |
| ) |
|
|
inlinevirtual |
QString GenericCommand::getName |
( |
| ) |
const |
|
inlineoverridevirtual |
void GenericCommand::execute |
( |
| ) |
|
|
inlineoverridevirtual |
void GenericCommand::unexecute |
( |
| ) |
|
|
inlineoverridevirtual |
QString GenericCommand::m_name |
|
private |
std::function<void()> GenericCommand::m_execute |
|
private |
std::function<void()> GenericCommand::m_unexecute |
|
private |
std::function<void()> GenericCommand::m_onDelete |
|
private |
The documentation for this class was generated from the following file: