#include <command.hpp>
Public Types | |
| typedef sigc::signal< void, const command_query &, const command_result & > | signal_result_type |
| typedef sigc::signal< void, const command_query & > | signal_query_failed_type |
| typedef sigc::signal< void, const std::string &, const std::string & > | signal_help_type |
Public Member Functions | |
| command_queue () | |
| void | query (const command_query &query) |
| Waits for a result for the given query. | |
| void | result (const command_result &result) |
| Replies a query in the queue. | |
| void | clear () |
| Clears the command queue. | |
| signal_result_type | result_event (const std::string &command) const |
| Signal that is emitted when a result for a previously sent command is available. | |
| signal_query_failed_type | query_failed_event () const |
| Emitted when a query failed because the server did not know the command. | |
| signal_help_type | help_event () const |
| Emitted for each help entry when a help command has been queried. | |
Protected Types | |
| typedef std::map< std::string, signal_result_type > | map_type |
Protected Member Functions | |
| void | on_help (const command_query &query, const command_result &result) |
Protected Attributes | |
| std::auto_ptr< map_type > | m_map |
| std::queue< command_query > | m_commands |
| signal_query_failed_type | m_signal_query_failed |
| signal_help_type | m_signal_help |
Stores commands that have been sent to be executed and waits for results.
Definition at line 195 of file command.hpp.
| typedef sigc::signal<void, const command_query&, const command_result&> obby::command_queue::signal_result_type |
Definition at line 199 of file command.hpp.
| typedef sigc::signal<void, const command_query&> obby::command_queue::signal_query_failed_type |
Definition at line 202 of file command.hpp.
| typedef sigc::signal<void, const std::string&, const std::string&> obby::command_queue::signal_help_type |
Definition at line 205 of file command.hpp.
typedef std::map<std::string, signal_result_type> obby::command_queue::map_type [protected] |
Definition at line 239 of file command.hpp.
| obby::command_queue::command_queue | ( | ) |
| void obby::command_queue::query | ( | const command_query & | query | ) |
Waits for a result for the given query.
Definition at line 281 of file command.cpp.
References m_commands.
Referenced by result().
| void obby::command_queue::result | ( | const command_result & | result | ) |
Replies a query in the queue.
Definition at line 286 of file command.cpp.
References m_commands, m_map, m_signal_query_failed, obby::command_result::NOT_FOUND, and query().
Referenced by on_help().
| void obby::command_queue::clear | ( | ) |
| obby::command_queue::signal_result_type obby::command_queue::result_event | ( | const std::string & | command | ) | const |
Signal that is emitted when a result for a previously sent command is available.
Definition at line 312 of file command.cpp.
References m_map.
Referenced by obby::basic_client_buffer< Document, Selector >::basic_client_buffer(), and command_queue().
| obby::command_queue::signal_query_failed_type obby::command_queue::query_failed_event | ( | ) | const |
Emitted when a query failed because the server did not know the command.
Definition at line 318 of file command.cpp.
References m_signal_query_failed.
| obby::command_queue::signal_help_type obby::command_queue::help_event | ( | ) | const |
Emitted for each help entry when a help command has been queried.
Definition at line 323 of file command.cpp.
References m_signal_help.
| void obby::command_queue::on_help | ( | const command_query & | query, | |
| const command_result & | result | |||
| ) | [protected] |
Definition at line 328 of file command.cpp.
References m_signal_help, and result().
Referenced by command_queue().
std::auto_ptr<map_type> obby::command_queue::m_map [protected] |
std::queue<command_query> obby::command_queue::m_commands [protected] |
signal_help_type obby::command_queue::m_signal_help [protected] |
1.5.1