My Project
CommandList.h
1 #ifndef __CommandList_h__
2 #define __CommandList_h__
3 
4 #include "TCPSession.h"
5 #include "Command.h"
6 #include "Log.h"
7 
8 namespace core {
9 
17 
18  class CommandList : public Command {
19 
20  public:
21 
22  CommandList(std::string delimiter = "", int depth = 0);
23 
27 
28  void add(Command &command, std::string name = "");
29 
33 
34  void remove(Command &command);
35 
42 
43  int processRequest(coreutils::ZString &request, TCPSession &session);
44 
50 
51  bool grabInput(TCPSession &session, Command &command);
52 
56 
57  void clearGrab(TCPSession &session);
58 
62 
63  int processCommand(coreutils::ZString &request, TCPSession &session);
64 
65  protected:
66 
70 
71  std::map<std::string, Command *> commands;
72  std::string delimiter;
73  int depth;
74 
75  };
76 
77 }
78 
79 #endif
Definition: CommandList.h:18
int processCommand(coreutils::ZString &request, TCPSession &session)
Definition: CommandList.cpp:43
bool grabInput(TCPSession &session, Command &command)
Definition: CommandList.cpp:34
void add(Command &command, std::string name="")
Definition: CommandList.cpp:8
void remove(Command &command)
Definition: CommandList.cpp:12
int processRequest(coreutils::ZString &request, TCPSession &session)
Definition: CommandList.cpp:14
std::map< std::string, Command * > commands
Definition: CommandList.h:71
Definition: Command.h:22
Definition: TCPSession.h:26