#ifndef __CommandList_h__ #define __CommandList_h__ #include "Session.h" #include "Command.h" namespace core { /// /// CommandList /// /// This object organizes Command objects into a list that is used /// to parse an input and run the process associated with the /// selected command. /// class CommandList : public Command { public: /// /// The constructor for the object. /// CommandList(); /// /// The destructor for the object. /// ~CommandList(); /// /// Add a new command to the command list and assign a default search value. /// void add(Command &command, std::string name = ""); void remove(Command &command); bool processRequest(std::string request, Session *session, std::stringstream &data); int processCommand(std::string request, Session *session, std::stringstream &data) override; private: std::vector commands; }; } #endif