#ifndef __COMPOSED_COMMAND__ #define __COMPOSED_COMMAND__ //------------------------------------------------------------------------------------------------------------ // Includes //------------------------------------------------------------------------------------------------------------ #include #include #include "CommandObject.h" /* class CommandObject; class ExecutableCommand;*/ class ComposedCommand : public CommandObject{ //------------------------------------------------------------------------------------------------------------ // Constructors & Destructors //------------------------------------------------------------------------------------------------------------ public: ComposedCommand( ); ~ComposedCommand( ); //------------------------------------------------------------------------------------------------------------ // Methods //------------------------------------------------------------------------------------------------------------ /* * Adds a command to the list of command * @param nwCommand Is the new command to include */ void addCommand(CommandObject * nwCommand); /* * 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 internal commands */ std::deque< CommandObject *> internalCommands; }; #endif