#ifndef __EXECUTABLE_COMMAND__ #define __EXECUTABLE_COMMAND__ //------------------------------------------------------------------------------------------------------------ // Includes //------------------------------------------------------------------------------------------------------------ #include #include "CommandObject.h" class ExecutableCommand : public CommandObject{ //------------------------------------------------------------------------------------------------------------ // Constructors & Destructors //------------------------------------------------------------------------------------------------------------ public: /* * Creates a command (executable) with the given text * @param aText Is the text to assign to the command * @return Returns the created ExecutableCommand pointer */ ExecutableCommand(std::string aText ); /* * Destroys the command */ ~ExecutableCommand( ); //------------------------------------------------------------------------------------------------------------ // Methods //------------------------------------------------------------------------------------------------------------ /* * Gets the text of the command * @return text Is the text of the command */ std::string getText(); /* * Sets the text of the command * @param theText Is the text of the command */ void setText(std::string theText); /* * Includes the command into the given queue for execution * @param executionQueue Is the queue in which is included the command */ virtual void includeToExecute(std::deque & executionQueue); /* * Counts the command(s) * @return The value of commands that represents this */ virtual int count(); /* * Method that clears the command */ virtual void clear(); //------------------------------------------------------------------------------------------------------------ // Constants //------------------------------------------------------------------------------------------------------------ private: //------------------------------------------------------------------------------------------------------------ // Attributes //------------------------------------------------------------------------------------------------------------ /* * Represents the text of the command */ std::string text; }; #endif