#ifndef CONSOLEMODEL_H_ #define CONSOLEMODEL_H_ #include #include #include "ConsoleView.h" #include "ConsoleCommand.h" class ConsoleView; class ConsoleModel { int currentCommandIndex; std::vector observers; std::deque previousCommands; void notifyPreviousCommandsChanged(); void notifyCurrentCommandChanged(); public: int GetCurrentCommandIndex(); void SetCurrentCommandIndex(int index); ConsoleCommand GetCurrentCommand(); std::deque GetPreviousCommands(); ConsoleModel(); void AddObserver(ConsoleView * observer); void AddLastCommand(ConsoleCommand command); virtual ~ConsoleModel(); }; #endif /* CONSOLEMODEL_H_ */