My Project
Public Member Functions | List of all members
core::Command Class Reference

#include <Command.h>

Inheritance diagram for core::Command:
Inheritance graph
[legend]

Public Member Functions

virtual int processCommand (coreutils::ZString &request, TCPSession &session)
 
virtual void output (std::stringstream &out)
 

Detailed Description

Command

Use the Command object in combination with a CommandList object to maintain a list of functions that can be invoked as a result of processing a request.

Member Function Documentation

◆ output()

void core::Command::output ( std::stringstream &  out)
virtual

Specify the output that will occur to the specified session.

Parameters
sessionThe session that will receive the output.

Reimplemented in core::TCPServer.

◆ processCommand()

int core::Command::processCommand ( coreutils::ZString &  request,
TCPSession session 
)
virtual

This method is used to implement the functionality of the requested command. This pure virtual function must be implemented in your inheriting object.

Parameters
requestThe request that was entered by the user to invoke this command.
sessionSpecify the requesting session so that the execution of the command process can return its output to the session.
Returns
Returns 0 if execution of the command was successful. Otherwise returns a non-zero value indicating an error condition.

Reimplemented in core::TCPServer, core::EPoll, core::SubscriptionManager, and core::CommandList.


The documentation for this class was generated from the following files: