Elimination of Service object,

This commit is contained in:
barant committed 2019-09-18 18:32:15 -07:00
1 parent a46db126e9
commit a40f7314a8
440 files changed
+17787 -516

No files matched your search

+3 -7
View File
@@ -1,11 +1,7 @@
#include "CommandList.h"\
namespace core {
CommandList::CommandList() {}
CommandList::~CommandList() {}
void CommandList::add(Command &command, std::string name) {
command.setName(name);
commands.push_back(&command);
@@ -15,7 +11,7 @@ namespace core {
}
bool CommandList::processRequest(std::string request, Session *session, std::stringstream &data) {
bool CommandList::processRequest(std::string request, TCPSession *session, std::stringstream &data) {
for(auto *command : commands) {
if(command->check(request)) {
command->processCommand(request, session, data);
@@ -25,7 +21,7 @@ namespace core {
return false;
}
int CommandList::processCommand(std::string request, Session *session, std::stringstream &data) {
int CommandList::processCommand(std::string request, TCPSession *session, std::stringstream &data) {
for(Command *command : commands)
data << command->getName() << std::endl;
}