BMA Server Framework
/home/bradarant/barant/ServerCore/CommandList.h
1 #ifndef __CommandList_h__
2 #define __CommandList_h__
3 
4 #include "Session.h"
5 #include "Command.h"
6 #include "Log.h"
7 
8 namespace core {
9 
17 
18  class CommandList : public Command {
19 
20  public:
21 
25 
26  CommandList();
27 
31 
32  ~CommandList();
33 
37 
38  void add(Command &command, std::string name = "");
39 
40  void remove(Command &command);
41 
42  bool processRequest(std::string request, Session *session, std::stringstream &data);
43 
44  int processCommand(std::string request, Session *session, std::stringstream &data) override;
45 
46  protected:
47  std::vector<Command *> commands;
48 
49  };
50 
51 }
52 
53 #endif
CommandList()
Definition: CommandList.cpp:5
Definition: Command.cpp:4
Definition: Session.h:22
~CommandList()
Definition: CommandList.cpp:7
int processCommand(std::string request, Session *session, std::stringstream &data) override
Definition: CommandList.cpp:28
Definition: Command.h:18
Definition: CommandList.h:18
void add(Command &command, std::string name="")
Definition: CommandList.cpp:9