Many changes

This commit is contained in:
Brad Arant committed 2021-08-05 13:07:53 -07:00
1 parent 50bbfcc3c3
commit 46f98dff69
11 files changed
+110 -100

No files matched your search

+14 -11
View File
@@ -11,18 +11,20 @@ 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.
/// to parse an input and run the process associated with the
/// selected command.
///
class CommandList : public Command {
public:
CommandList(std::string delimiter = "");
///
/// Add a new command to the command list and assign a default search value.
///
void add(Command &command, std::string name = "");
///
@@ -32,13 +34,13 @@ namespace core {
void remove(Command &command);
///
/// Use this method to apply a parsed PString to the command set and execute
/// Use this method to apply a parsed ZString to the command set and execute
/// the matching parameter. The selected command will return a true on a call
/// to check(). If there is a handler that has a grab on the process handler
/// then control is given to the process handler holding the grab on the input.
///
bool processRequest(coreutils::ZString request, TCPSession *session, std::stringstream &data);
bool processRequest(coreutils::ZString &request, TCPSession &session);
///
/// Use grabInput() within a Command object to force the requesting handler to receive
@@ -46,19 +48,19 @@ namespace core {
/// back to normal command processing.
///
bool grabInput(TCPSession *session, Command &command);
bool grabInput(TCPSession &session, Command &command);
///
///
///
void clearGrab(TCPSession *session);
void clearGrab(TCPSession &session);
///
///
///
int processCommand(std::string request, TCPSession *session, std::stringstream &data);
int processCommand(coreutils::ZString &request, TCPSession &session);
protected:
@@ -67,6 +69,7 @@ namespace core {
///
std::vector<Command *> commands;
std::string delimiter;
};