MCPcopy Create free account
hub / github.com/BeneficialCode/WinArk / AddCommand

Method AddCommand

WinArk/CommandManager.cpp:21–32  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19}
20
21bool CommandManager::AddCommand(std::shared_ptr<AppCommand> command, bool execute) {
22 if (execute)
23 if (!command->Execute())
24 return false;
25
26 if (!_enabled)
27 return true;
28
29 _undoList.push_back(command);
30 _redoList.clear();
31 return true;
32}
33
34bool CommandManager::Undo() {
35 if (!CanUndo())

Callers

nothing calls this directly

Calls 3

push_backMethod · 0.80
clearMethod · 0.80
ExecuteMethod · 0.45

Tested by

no test coverage detected