// $Id: AfterCommand.hh 5993 2007-01-12 22:12:12Z m9710797 $ #ifndef AFTERCOMMAND_HH #define AFTERCOMMAND_HH #include "Command.hh" #include "EventListener.hh" #include "Event.hh" #include namespace openmsx { class Reactor; class EventDistributor; class CommandController; class AfterCmd; class AfterCommand : public SimpleCommand, private EventListener { public: AfterCommand(Reactor& reactor, EventDistributor& eventDistributor, CommandController& commandController); virtual ~AfterCommand(); virtual std::string execute(const std::vector& tokens); virtual std::string help(const std::vector& tokens) const; virtual void tabCompletion(std::vector& tokens) const; private: std::string afterTime(const std::vector& tokens); std::string afterIdle(const std::vector& tokens); std::string afterInfo(const std::vector& tokens); std::string afterCancel(const std::vector& tokens); template std::string afterEvent( const std::vector& tokens); template void executeEvents(); // EventListener virtual bool signalEvent(shared_ptr event); typedef std::map AfterCmdMap; AfterCmdMap afterCmds; Reactor& reactor; EventDistributor& eventDistributor; friend class AfterCmd; }; } // namespace openmsx #endif