#include <entry.hpp>
Public Types | |
| enum | data_type { int_t, string_t, list_t, dictionary_t, undefined_t } |
| typedef std::map< std::string, entry > | dictionary_type |
| typedef std::string | string_type |
| typedef std::list< entry > | list_type |
| typedef size_type | integer_type |
Public Member Functions | |
| data_type | type () const |
| entry (dictionary_type const &) | |
| entry (string_type const &) | |
| entry (list_type const &) | |
| entry (integer_type const &) | |
| entry () | |
| entry (data_type t) | |
| entry (entry const &e) | |
| ~entry () | |
| bool | operator== (entry const &e) const |
| void | operator= (entry const &) |
| void | operator= (dictionary_type const &) |
| void | operator= (string_type const &) |
| void | operator= (list_type const &) |
| void | operator= (integer_type const &) |
| integer_type & | integer () |
| const integer_type & | integer () const |
| string_type & | string () |
| const string_type & | string () const |
| list_type & | list () |
| const list_type & | list () const |
| dictionary_type & | dict () |
| const dictionary_type & | dict () const |
| entry & | operator[] (char const *key) |
| entry & | operator[] (std::string const &key) |
| const entry & | operator[] (char const *key) const |
| const entry & | operator[] (std::string const &key) const |
| entry * | find_key (char const *key) |
| entry const * | find_key (char const *key) const |
| void | print (std::ostream &os, int indent=0) const |
Private Member Functions | |
| void | construct (data_type t) |
| void | copy (const entry &e) |
| void | destruct () |
Private Attributes | |
| data_type | m_type |
| union { | |
| char data [detail::max4< sizeof(list_type), sizeof(dictionary_type), sizeof(string_type), sizeof(integer_type)>::value] | |
| integer_type dummy_aligner | |
| }; | |
Definition at line 108 of file entry.hpp.
| typedef std::map<std::string, entry> libtorrent::entry::dictionary_type |
| typedef std::string libtorrent::entry::string_type |
| typedef std::list<entry> libtorrent::entry::list_type |
| libtorrent::entry::entry | ( | dictionary_type const & | v | ) |
| libtorrent::entry::entry | ( | string_type const & | v | ) |
| libtorrent::entry::entry | ( | list_type const & | v | ) |
| libtorrent::entry::entry | ( | integer_type const & | v | ) |
| libtorrent::entry::entry | ( | ) | [inline] |
| libtorrent::entry::entry | ( | data_type | t | ) | [inline] |
| libtorrent::entry::entry | ( | entry const & | e | ) | [inline] |
| libtorrent::entry::~entry | ( | ) | [inline] |
| entry::data_type libtorrent::entry::type | ( | ) | const [inline] |
Definition at line 209 of file entry.hpp.
References m_type.
Referenced by libtorrent::detail::bencode_recursive(), entry_to_python::convert0(), libtorrent::dht::dht_tracker::dht_tracker(), libtorrent::aux::piece_checker_data::parse_resume_data(), read_id(), libtorrent::torrent_info::read_torrent_info(), libtorrent::dht::dht_tracker::send_packet(), and libtorrent::dht::node_impl::verify_token().
| void libtorrent::entry::operator= | ( | entry const & | e | ) | [inline] |
| void libtorrent::entry::operator= | ( | dictionary_type const & | v | ) |
| void libtorrent::entry::operator= | ( | string_type const & | v | ) |
| void libtorrent::entry::operator= | ( | list_type const & | v | ) |
| void libtorrent::entry::operator= | ( | integer_type const & | v | ) |
| entry::integer_type & libtorrent::entry::integer | ( | ) | [inline] |
Definition at line 222 of file entry.hpp.
References construct(), data, int_t, m_type, and undefined_t.
Referenced by libtorrent::detail::bdecode_recursive(), libtorrent::detail::bencode_recursive(), entry_to_python::convert0(), copy(), libtorrent::http_tracker_connection::extract_peer_info(), extract_single_file(), libtorrent::dht::dht_tracker::on_receive(), operator==(), libtorrent::http_tracker_connection::parse(), libtorrent::torrent_info::parse_info_section(), libtorrent::aux::piece_checker_data::parse_resume_data(), and print().
| entry::integer_type const & libtorrent::entry::integer | ( | ) | const [inline] |
| entry::string_type & libtorrent::entry::string | ( | ) | [inline] |
Definition at line 235 of file entry.hpp.
References construct(), data, m_type, string_t, and undefined_t.
Referenced by libtorrent::detail::bdecode_recursive(), libtorrent::detail::bencode_recursive(), entry_to_python::convert0(), copy(), libtorrent::torrent_info::create_info_metadata(), libtorrent::http_tracker_connection::extract_peer_info(), libtorrent::dht::dht_tracker::on_receive(), operator==(), libtorrent::http_tracker_connection::parse(), libtorrent::torrent_info::parse_info_section(), libtorrent::aux::piece_checker_data::parse_resume_data(), print(), libtorrent::torrent_info::read_torrent_info(), libtorrent::dht::dht_tracker::send_packet(), and libtorrent::dht::node_impl::verify_token().
| entry::string_type const & libtorrent::entry::string | ( | ) | const [inline] |
| entry::list_type & libtorrent::entry::list | ( | ) | [inline] |
Definition at line 248 of file entry.hpp.
References construct(), data, list_t, m_type, and undefined_t.
Referenced by libtorrent::detail::bdecode_recursive(), libtorrent::detail::bencode_recursive(), entry_from_python::construct0(), entry_to_python::convert0(), copy(), libtorrent::torrent_info::create_info_metadata(), libtorrent::torrent_info::create_torrent(), extract_single_file(), libtorrent::dht::dht_tracker::on_receive(), operator==(), libtorrent::http_tracker_connection::parse(), libtorrent::torrent_info::parse_info_section(), libtorrent::aux::piece_checker_data::parse_resume_data(), print(), read_endpoint_list(), libtorrent::torrent_info::read_torrent_info(), libtorrent::dht::dht_tracker::send_packet(), and libtorrent::dht::dht_tracker::state().
| entry::list_type const & libtorrent::entry::list | ( | ) | const [inline] |
| entry::dictionary_type & libtorrent::entry::dict | ( | ) | [inline] |
Definition at line 261 of file entry.hpp.
References construct(), data, dictionary_t, m_type, and undefined_t.
Referenced by libtorrent::detail::bencode_recursive(), entry_from_python::construct0(), entry_to_python::convert0(), copy(), find_key(), operator==(), operator[](), libtorrent::torrent_info::parse_info_section(), and print().
| entry::dictionary_type const & libtorrent::entry::dict | ( | ) | const [inline] |
| entry & libtorrent::entry::operator[] | ( | char const * | key | ) |
Definition at line 68 of file entry.cpp.
References dict(), entry(), and asio::placeholders::iterator.
| entry & libtorrent::entry::operator[] | ( | std::string const & | key | ) |
| const entry & libtorrent::entry::operator[] | ( | char const * | key | ) | const |
| const entry & libtorrent::entry::operator[] | ( | std::string const & | key | ) | const |
| entry * libtorrent::entry::find_key | ( | char const * | key | ) |
Definition at line 83 of file entry.cpp.
References dict(), and asio::placeholders::iterator.
Referenced by libtorrent::dht::dht_tracker::dht_tracker(), libtorrent::http_tracker_connection::extract_peer_info(), extract_single_file(), libtorrent::bt_peer_connection::on_extended_handshake(), libtorrent::dht::dht_tracker::on_receive(), libtorrent::torrent_info::parse_info_section(), libtorrent::aux::piece_checker_data::parse_resume_data(), read_id(), and libtorrent::torrent_info::read_torrent_info().
| entry const * libtorrent::entry::find_key | ( | char const * | key | ) | const |
| void libtorrent::entry::print | ( | std::ostream & | os, | |
| int | indent = 0 | |||
| ) | const |
Definition at line 253 of file entry.cpp.
References dict(), dictionary_t, int_t, integer(), list(), list_t, m_type, string(), and string_t.
Referenced by libtorrent::bt_peer_connection::on_extended_handshake(), libtorrent::operator<<(), and libtorrent::bt_peer_connection::write_extensions().
| void libtorrent::entry::construct | ( | data_type | t | ) | [private] |
| void libtorrent::entry::copy | ( | const entry & | e | ) | [private] |
Definition at line 209 of file entry.cpp.
References data, dict(), dictionary_t, int_t, integer(), list(), list_t, m_type, string(), string_t, and undefined_t.
Referenced by entry(), and operator=().
| void libtorrent::entry::destruct | ( | ) | [private] |
Definition at line 231 of file entry.cpp.
References call_destructor(), data, dictionary_t, int_t, list_t, m_type, string_t, and undefined_t.
Referenced by operator=(), and ~entry().
data_type libtorrent::entry::m_type [private] |
Definition at line 175 of file entry.hpp.
Referenced by construct(), copy(), destruct(), dict(), entry(), integer(), list(), operator=(), operator==(), print(), string(), and type().
| char libtorrent::entry::data[detail::max4< sizeof(list_type), sizeof(dictionary_type), sizeof(string_type), sizeof(integer_type)>::value] |
Definition at line 196 of file entry.hpp.
Referenced by construct(), copy(), destruct(), dict(), entry(), integer(), list(), operator=(), and string().
union { ... } [private] |
1.5.6