Implementation of Serice object into structure.

This commit is contained in:
Brad Arant committed 2019-02-16 12:01:36 -08:00
1 parent a2526dd3ed
commit 2cb1e3e2f2
23 files changed
+278 -293

No files matched your search

+39 -17
View File
@@ -5,26 +5,48 @@
#include "Command.h"
namespace core {
class CommandList : public Command {
public:
CommandList();
~CommandList();
void add(Command &command, std::string name = "");
void remove(Command &command);
bool processRequest(std::string request, Session *session);
///
/// 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);
int processCommand(std::string request, Session *session) override;
private:
std::vector<Command *> commands;
};
private:
std::vector<Command *> commands;
};
}
#endif