Classes |
Public Member Functions |
Static Public Member Functions |
Private Attributes |
Static Private Attributes |
List of all members
dnai::commands::CommandManager Class Reference
#include <commandmanager.h>
Collaboration diagram for dnai::commands::CommandManager:

Classes | |
| class | CommandStack |
| The CommandStack class behaves like a stack of interface::ICommand * but allow to remove any command from it. More... | |
Public Member Functions | |
| CommandManager () | |
| void | registerCommand (interfaces::ICommand *cmd) |
| Register a command. More... | |
| void | execAll () |
| Execute all the registers commands. More... | |
| void | exec (interfaces::ICommand *command) |
| Execute immediatlty the command. More... | |
| void | redo (int levels) |
| Exectute the next command. More... | |
| void | undo (int levels) |
| Execute the last command. More... | |
| void | setConsoleView (views::Console *consoleView) |
| Assign the console view. More... | |
| const controllers::ConsoleController & | console () const |
| Return the console view. More... | |
| void | removeCommand (interfaces::ICommand *c) |
| Removes a command from undoList or redoList. More... | |
Static Public Member Functions | |
| static CommandManager * | Instance () |
Private Attributes | |
| CommandStack | m_undoList |
| CommandStack | m_redoList |
| std::queue< interfaces::ICommand * > | m_doList |
| controllers::ConsoleController | m_console |
Static Private Attributes | |
| static CommandManager * | m_instance = nullptr |
Constructor & Destructor Documentation
| dnai::commands::CommandManager::CommandManager | ( | ) |
Member Function Documentation
| const controllers::ConsoleController & dnai::commands::CommandManager::console | ( | ) | const |
Return the console view.
- Returns
- const controllers::ConsoleController&
| void dnai::commands::CommandManager::exec | ( | interfaces::ICommand * | command | ) |
Execute immediatlty the command.
- Parameters
-
command
| void dnai::commands::CommandManager::execAll | ( | ) |
Execute all the registers commands.
|
static |
| void dnai::commands::CommandManager::redo | ( | int | levels | ) |
Exectute the next command.
- Parameters
-
levels
| void dnai::commands::CommandManager::registerCommand | ( | interfaces::ICommand * | cmd | ) |
Register a command.
- Parameters
-
cmd
| void dnai::commands::CommandManager::removeCommand | ( | interfaces::ICommand * | c | ) |
Removes a command from undoList or redoList.
- Parameters
-
c Command pointer to remove
| void dnai::commands::CommandManager::setConsoleView | ( | views::Console * | consoleView | ) |
Assign the console view.
- Parameters
-
consoleView
| void dnai::commands::CommandManager::undo | ( | int | levels | ) |
Execute the last command.
- Parameters
-
levels
Member Data Documentation
|
private |
|
private |
|
staticprivate |
|
private |
|
private |
The documentation for this class was generated from the following files:
- Gui/app/include/dnai/commands/commandmanager.h
- Gui/app/src/dnai/commands/commandmanager.cpp

1.8.9