| 70 | | typedef const torrent::Object (*generic_slot) (Command*, const torrent::Object&); |
| 71 | | typedef const torrent::Object (*any_slot) (Command*, target_type, const torrent::Object&); |
| 72 | | typedef const torrent::Object (*download_slot) (Command*, core::Download*, const torrent::Object&); |
| 73 | | typedef const torrent::Object (*file_slot) (Command*, torrent::File*, const torrent::Object&); |
| 74 | | typedef const torrent::Object (*file_itr_slot) (Command*, torrent::FileListIterator*, const torrent::Object&); |
| 75 | | typedef const torrent::Object (*peer_slot) (Command*, torrent::Peer*, const torrent::Object&); |
| 76 | | typedef const torrent::Object (*tracker_slot) (Command*, torrent::Tracker*, const torrent::Object&); |
| 86 | | generic_slot m_genericSlot; |
| 87 | | any_slot m_anySlot; |
| 88 | | download_slot m_downloadSlot; |
| 89 | | file_slot m_fileSlot; |
| 90 | | file_itr_slot m_fileItrSlot; |
| 91 | | peer_slot m_peerSlot; |
| 92 | | tracker_slot m_trackerSlot; |
| | 68 | Command::generic_slot m_genericSlot; |
| | 69 | Command::any_slot m_anySlot; |
| | 70 | Command::download_slot m_downloadSlot; |
| | 71 | Command::file_slot m_fileSlot; |
| | 72 | Command::file_itr_slot m_fileItrSlot; |
| | 73 | Command::peer_slot m_peerSlot; |
| | 74 | Command::tracker_slot m_trackerSlot; |
| 145 | | void insert_generic (key_type key, Command* variable, generic_slot targetSlot, int flags, const char* parm, const char* doc); |
| 146 | | void insert_any (key_type key, Command* variable, any_slot targetSlot, int flags, const char* parm, const char* doc); |
| 147 | | void insert_download(key_type key, Command* variable, download_slot targetSlot, int flags, const char* parm, const char* doc); |
| 148 | | void insert_peer (key_type key, Command* variable, peer_slot targetSlot, int flags, const char* parm, const char* doc); |
| 149 | | void insert_tracker (key_type key, Command* variable, tracker_slot targetSlot, int flags, const char* parm, const char* doc); |
| 150 | | void insert_file (key_type key, Command* variable, file_slot targetSlot, int flags, const char* parm, const char* doc); |
| 151 | | void insert_file_itr(key_type key, Command* variable, file_itr_slot targetSlot, int flags, const char* parm, const char* doc); |
| | 111 | template <typename T> |
| | 112 | void insert_type(key_type key, Command* variable, T targetSlot, int flags, const char* parm, const char* doc) { |
| | 113 | iterator itr = insert(key, variable, flags, parm, doc); |
| | 114 | |
| | 115 | itr->second.m_target = target_type_id<T>::value; |
| | 116 | itr->second.m_genericSlot = (Command::generic_slot)targetSlot; |
| | 117 | } |
| 155 | | const mapped_type call_command (key_type key, const mapped_type& arg, target_type target = target_type((int)target_generic, NULL)); |
| 156 | | const mapped_type call_command (const_iterator itr, const mapped_type& arg, target_type target = target_type((int)target_generic, NULL)); |
| | 121 | const mapped_type call_command (key_type key, const mapped_type& arg, target_type target = target_type((int)Command::target_generic, NULL)); |
| | 122 | const mapped_type call_command (const_iterator itr, const mapped_type& arg, target_type target = target_type((int)Command::target_generic, NULL)); |
| 158 | | const mapped_type call_command_d(key_type key, core::Download* download, const mapped_type& arg) { return call_command(key, arg, target_type((int)target_download, download)); } |
| 159 | | const mapped_type call_command_p(key_type key, torrent::Peer* peer, const mapped_type& arg) { return call_command(key, arg, target_type((int)target_peer, peer)); } |
| 160 | | const mapped_type call_command_t(key_type key, torrent::Tracker* tracker, const mapped_type& arg) { return call_command(key, arg, target_type((int)target_tracker, tracker)); } |
| 161 | | const mapped_type call_command_f(key_type key, torrent::File* file, const mapped_type& arg) { return call_command(key, arg, target_type((int)target_file, file)); } |
| | 124 | const mapped_type call_command_d(key_type key, core::Download* download, const mapped_type& arg) { return call_command(key, arg, target_type((int)Command::target_download, download)); } |
| | 125 | const mapped_type call_command_p(key_type key, torrent::Peer* peer, const mapped_type& arg) { return call_command(key, arg, target_type((int)Command::target_peer, peer)); } |
| | 126 | const mapped_type call_command_t(key_type key, torrent::Tracker* tracker, const mapped_type& arg) { return call_command(key, arg, target_type((int)Command::target_tracker, tracker)); } |
| | 127 | const mapped_type call_command_f(key_type key, torrent::File* file, const mapped_type& arg) { return call_command(key, arg, target_type((int)Command::target_file, file)); } |
| 168 | | inline target_type make_target() { return target_type((int)CommandMap::target_generic, NULL); } |
| 169 | | inline target_type make_target(core::Download* target) { return target_type((int)CommandMap::target_download, target); } |
| 170 | | inline target_type make_target(torrent::Peer* target) { return target_type((int)CommandMap::target_peer, target); } |
| 171 | | inline target_type make_target(torrent::Tracker* target) { return target_type((int)CommandMap::target_tracker, target); } |
| 172 | | inline target_type make_target(torrent::File* target) { return target_type((int)CommandMap::target_file, target); } |
| 173 | | inline target_type make_target(torrent::FileListIterator* target) { return target_type((int)CommandMap::target_file_itr, target); } |
| | 134 | inline target_type make_target() { return target_type((int)Command::target_generic, NULL); } |
| | 135 | inline target_type make_target(core::Download* target) { return target_type((int)Command::target_download, target); } |
| | 136 | inline target_type make_target(torrent::Peer* target) { return target_type((int)Command::target_peer, target); } |
| | 137 | inline target_type make_target(torrent::Tracker* target) { return target_type((int)Command::target_tracker, target); } |
| | 138 | inline target_type make_target(torrent::File* target) { return target_type((int)Command::target_file, target); } |
| | 139 | inline target_type make_target(torrent::FileListIterator* target) { return target_type((int)Command::target_file_itr, target); } |