yaze 0.2.0
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze::app::editor::CommandManager Class Reference

#include <command_manager.h>

Public Member Functions

void RegisterCommand (const std::string &shortcut, Command *command)
 
void ExecuteCommand (const std::string &shortcut)
 
void Undo ()
 
void Redo ()
 

Private Attributes

std::stack< Command * > undo_stack_
 
std::stack< Command * > redo_stack_
 
std::unordered_map< std::string, Command * > commands_
 

Detailed Description

Definition at line 17 of file command_manager.h.

Member Function Documentation

◆ RegisterCommand()

void yaze::app::editor::CommandManager::RegisterCommand ( const std::string & shortcut,
Command * command )
inline

Definition at line 19 of file command_manager.h.

References commands_.

◆ ExecuteCommand()

void yaze::app::editor::CommandManager::ExecuteCommand ( const std::string & shortcut)
inline

Definition at line 23 of file command_manager.h.

References commands_.

◆ Undo()

void yaze::app::editor::CommandManager::Undo ( )
inline

Definition at line 29 of file command_manager.h.

References redo_stack_, and undo_stack_.

◆ Redo()

void yaze::app::editor::CommandManager::Redo ( )
inline

Definition at line 37 of file command_manager.h.

References redo_stack_, and undo_stack_.

Member Data Documentation

◆ undo_stack_

std::stack<Command*> yaze::app::editor::CommandManager::undo_stack_
private

Definition at line 46 of file command_manager.h.

Referenced by Redo(), and Undo().

◆ redo_stack_

std::stack<Command*> yaze::app::editor::CommandManager::redo_stack_
private

Definition at line 47 of file command_manager.h.

Referenced by Redo(), and Undo().

◆ commands_

std::unordered_map<std::string, Command*> yaze::app::editor::CommandManager::commands_
private

Definition at line 48 of file command_manager.h.

Referenced by ExecuteCommand(), and RegisterCommand().


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