libtorrent::entry Class Reference

#include <entry.hpp>

List of all members.

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< entrylist_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_typeinteger ()
const integer_typeinteger () const
string_typestring ()
const string_typestring () const
list_typelist ()
const list_typelist () const
dictionary_typedict ()
const dictionary_typedict () const
entryoperator[] (char const *key)
entryoperator[] (std::string const &key)
const entryoperator[] (char const *key) const
const entryoperator[] (std::string const &key) const
entryfind_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
}; 


Detailed Description

Definition at line 108 of file entry.hpp.


Member Typedef Documentation

typedef std::map<std::string, entry> libtorrent::entry::dictionary_type

Definition at line 115 of file entry.hpp.

typedef std::string libtorrent::entry::string_type

Definition at line 116 of file entry.hpp.

typedef std::list<entry> libtorrent::entry::list_type

Definition at line 117 of file entry.hpp.

Definition at line 118 of file entry.hpp.


Member Enumeration Documentation

Enumerator:
int_t 
string_t 
list_t 
dictionary_t 
undefined_t 

Definition at line 120 of file entry.hpp.


Constructor & Destructor Documentation

libtorrent::entry::entry ( dictionary_type const &  v  ) 

Definition at line 114 of file entry.cpp.

References data, dictionary_t, and m_type.

libtorrent::entry::entry ( string_type const &  v  ) 

Definition at line 120 of file entry.cpp.

References data, m_type, and string_t.

libtorrent::entry::entry ( list_type const &  v  ) 

Definition at line 126 of file entry.cpp.

References data, list_t, and m_type.

libtorrent::entry::entry ( integer_type const &  v  ) 

Definition at line 132 of file entry.cpp.

References data, int_t, and m_type.

libtorrent::entry::entry (  )  [inline]

Definition at line 211 of file entry.hpp.

Referenced by operator[]().

libtorrent::entry::entry ( data_type  t  )  [inline]

Definition at line 212 of file entry.hpp.

References construct().

libtorrent::entry::entry ( entry const &  e  )  [inline]

Definition at line 213 of file entry.hpp.

References copy().

libtorrent::entry::~entry (  )  [inline]

Definition at line 214 of file entry.hpp.

References destruct().


Member Function Documentation

entry::data_type libtorrent::entry::type (  )  const [inline]

bool libtorrent::entry::operator== ( entry const &  e  )  const

Definition at line 166 of file entry.cpp.

References dict(), dictionary_t, int_t, integer(), list(), list_t, m_type, string(), string_t, and undefined_t.

void libtorrent::entry::operator= ( entry const &  e  )  [inline]

Definition at line 216 of file entry.hpp.

References copy(), and destruct().

void libtorrent::entry::operator= ( dictionary_type const &  v  ) 

Definition at line 138 of file entry.cpp.

References data, destruct(), dictionary_t, and m_type.

void libtorrent::entry::operator= ( string_type const &  v  ) 

Definition at line 145 of file entry.cpp.

References data, destruct(), m_type, and string_t.

void libtorrent::entry::operator= ( list_type const &  v  ) 

Definition at line 152 of file entry.cpp.

References data, destruct(), list_t, and m_type.

void libtorrent::entry::operator= ( integer_type const &  v  ) 

Definition at line 159 of file entry.cpp.

References data, destruct(), int_t, and m_type.

entry::integer_type & libtorrent::entry::integer (  )  [inline]

entry::integer_type const & libtorrent::entry::integer (  )  const [inline]

Definition at line 229 of file entry.hpp.

References data, int_t, and m_type.

entry::string_type & libtorrent::entry::string (  )  [inline]

entry::string_type const & libtorrent::entry::string (  )  const [inline]

Definition at line 242 of file entry.hpp.

References data, m_type, and string_t.

entry::list_type & libtorrent::entry::list (  )  [inline]

entry::list_type const & libtorrent::entry::list (  )  const [inline]

Definition at line 255 of file entry.hpp.

References data, list_t, and m_type.

entry::dictionary_type & libtorrent::entry::dict (  )  [inline]

entry::dictionary_type const & libtorrent::entry::dict (  )  const [inline]

Definition at line 268 of file entry.hpp.

References data, dictionary_t, and m_type.

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  ) 

Definition at line 78 of file entry.cpp.

const entry & libtorrent::entry::operator[] ( char const *  key  )  const

Definition at line 101 of file entry.cpp.

References dict().

const entry & libtorrent::entry::operator[] ( std::string const &  key  )  const

Definition at line 109 of file entry.cpp.

entry * libtorrent::entry::find_key ( char const *  key  ) 

entry const * libtorrent::entry::find_key ( char const *  key  )  const

Definition at line 94 of file entry.cpp.

References dict().

void libtorrent::entry::print ( std::ostream &  os,
int  indent = 0 
) const

void libtorrent::entry::construct ( data_type  t  )  [private]

Definition at line 186 of file entry.cpp.

References data, dictionary_t, int_t, list_t, m_type, string_t, and undefined_t.

Referenced by dict(), entry(), integer(), list(), and string().

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().


Member Data Documentation

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().

Definition at line 197 of file entry.hpp.

union { ... } [private]


The documentation for this class was generated from the following files:

Generated on Sun May 25 00:21:41 2008 by  doxygen 1.5.6