#include <command.hpp>
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 |
Definition at line 75 of file command.hpp.
Type of result.
| 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.
| obby::command_result::command_result | ( | ) |
| obby::command_result::command_result | ( | type | type, | |
| const std::string & | reply = "" | |||
| ) |
| obby::command_result::command_result | ( | const net6::packet & | pack, | |
| unsigned int & | index | |||
| ) |
| obby::command_result::type obby::command_result::get_type | ( | ) | const |
| const std::string & obby::command_result::get_reply | ( | ) | const |
| 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().
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] |
1.5.1