QCommandHandler Class Reference
[ApolloNetworking]

List of all members.


Detailed Description

this class encapsulates command execution in client/server communication. It has only one method that takes a command string as argument and returns the answer to be sent back to the client formatted as string.

Author:
Sergio Di Domizio

Public Member Functions

 QCommandHandler ()
 ctor
virtual ~QCommandHandler ()
 dtor
std::string HandleCommand (const char *cmd) const
 select appropriate command using QParserFinder and the appropriate command parser, then execute the command and build answer string using QNwMessageBuilder.

Member Function Documentation

std::string QCommandHandler::HandleCommand ( const char *  cmd  )  const

select appropriate command using QParserFinder and the appropriate command parser, then execute the command and build answer string using QNwMessageBuilder.

Parameters:
cmd complete command string as it is received from network
Returns:
answer string ready to be sent back to the client (apart for the message terminating character)

References QNwMessageBuilder::BuildMessage(), QCommand::Execute(), QParserFinder::Get(), QCommand::GetAnswerMap(), QParserFinder::GetParser(), QCommand::IsValid(), QBaseCmdParser::Parse(), QNwMessageBuilder::SetCommand(), and QNwMessageBuilder::SetParameterList().

Referenced by QFileDescriptor::HandleCommand().


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

Generated on Tue Nov 16 10:50:05 2010 for CUORE Software by  doxygen 1.5.6