obby::command_result Class Reference

Result of command execution. More...

#include <command.hpp>

List of all members.

Public Types

enum  type { NOT_FOUND, NO_REPLY, REPLY }
 Type of result. More...

Public Member Functions

 command_result ()
 Standard constructor required by sigc::slot.
 command_result (type type, const std::string &reply="")
 Creates a command result.
 command_result (const net6::packet &pack, unsigned int &index)
 Reads a command result from a network packet.
type get_type () const
 Gets the type of result.
const std::string & get_reply () const
 Returns the reply from the server.
void append_packet (net6::packet &pack) const
 Appends the result to packet.

Protected Attributes

type m_type
std::string m_reply


Detailed Description

Result of command execution.

Definition at line 75 of file command.hpp.


Member Enumeration Documentation

enum obby::command_result::type

Type of result.

Enumerator:
NOT_FOUND  Command has not been found.
NO_REPLY  Dummy for commands without reply.
REPLY  Command has a reply.

Definition at line 80 of file command.hpp.


Constructor & Destructor Documentation

obby::command_result::command_result (  ) 

Standard constructor required by sigc::slot.

Definition at line 151 of file command.cpp.

obby::command_result::command_result ( type  type,
const std::string &  reply = "" 
)

Creates a command result.

Definition at line 156 of file command.cpp.

References REPLY.

obby::command_result::command_result ( const net6::packet &  pack,
unsigned int &  index 
)

Reads a command result from a network packet.

Definition at line 170 of file command.cpp.

References m_type, and REPLY.


Member Function Documentation

obby::command_result::type obby::command_result::get_type (  )  const

Gets the type of result.

Definition at line 183 of file command.cpp.

References m_type.

const std::string & obby::command_result::get_reply (  )  const

Returns the reply from the server.

Definition at line 188 of file command.cpp.

References m_reply.

void obby::command_result::append_packet ( net6::packet &  pack  )  const

Appends the result to packet.

Definition at line 193 of file command.cpp.

References m_reply, m_type, and REPLY.

Referenced by obby::basic_server_buffer< Document, Selector >::on_net_command_query().


Member Data Documentation

type obby::command_result::m_type [protected]

Definition at line 118 of file command.hpp.

Referenced by append_packet(), command_result(), and get_type().

std::string obby::command_result::m_reply [protected]

Definition at line 119 of file command.hpp.

Referenced by append_packet(), and get_reply().


The documentation for this class was generated from the following files:
Generated on Fri Jan 11 10:01:32 2008 for obby by  doxygen 1.5.1