TPProto::Command Class Reference

An administration command frame. More...

#include <command.h>

Inheritance diagram for TPProto::Command:

TPProto::Frame List of all members.

Public Member Functions

 Command ()
 Default constructor.
virtual ~Command ()
 Destructor.
void packBuffer (Buffer *buf)
 Pack this Command Frame into a Buffer.
bool unpackBuffer (Buffer *buf)
 Unpack from a Buffer, fails always. Command frames are only sent to the server, so unpacking is not needed.
std::string getName ()
 Gets the name of this command type.
std::string getDescription ()
 Gets the text description of this command type.
unsigned int getCommandType ()
 Gets the command type number of this command.
unsigned int getNumParameters ()
 Gets the number of CommandParameters this command has.
CommandParameter * getParameter (unsigned int which)
 Gets a CommandParameter.
void setCommandType (boost::shared_ptr< CommandDescription > cd)
 Sets the command type using a CommandDescription.
void fillParameterList (std::list< CommandParameter * > plist)
 Fills the parameter list with valued parameters.

Detailed Description

An administration command frame.


Constructor & Destructor Documentation

TPProto::Command::~Command (  )  [virtual]

Destructor.

Deletes the CommandParameters it contains.


Member Function Documentation

void TPProto::Command::packBuffer ( Buffer buf  )  [virtual]

Pack this Command Frame into a Buffer.

Parameters:
buf The Buffer to pack into.

Implements TPProto::Frame.

bool TPProto::Command::unpackBuffer ( Buffer buf  )  [virtual]

Unpack from a Buffer, fails always. Command frames are only sent to the server, so unpacking is not needed.

Parameters:
buf The Buffer to unpack out of, ignored.
Returns:
False always.

Implements TPProto::Frame.

std::string TPProto::Command::getName (  ) 

Gets the name of this command type.

Returns:
The name of the command.

std::string TPProto::Command::getDescription (  ) 

Gets the text description of this command type.

Returns:
The text description of the command.

unsigned int TPProto::Command::getCommandType (  ) 

Gets the command type number of this command.

Returns:
The command type number.

unsigned int TPProto::Command::getNumParameters (  ) 

Gets the number of CommandParameters this command has.

Returns:
The number of parameters.

CommandParameter * TPProto::Command::getParameter ( unsigned int  which  ) 

Gets a CommandParameter.

Parameters:
which The number of the parameter to get.
Returns:
The which-th CommandParameter on this order or NULL if which is not valid.

void TPProto::Command::setCommandType ( boost::shared_ptr< CommandDescription cd  ) 

Sets the command type using a CommandDescription.

Parameters:
cd The CommandDescription describing the command type required.

void TPProto::Command::fillParameterList ( std::list< CommandParameter * >  plist  ) 

Fills the parameter list with valued parameters.

Parameters:
plist The valued parameter list.


The documentation for this class was generated from the following files:
Generated on Tue Jan 6 03:15:47 2009 for libtpproto-cpp by  doxygen 1.5.1