Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
boost::asio::ip::basic_resolver_iterator< InternetProtocol > Class Template Reference

An iterator over the entries produced by a resolver. More...

#include <basic_resolver_iterator.hpp>

Public Types

typedef std::ptrdiff_t difference_type
 The type used for the distance between two iterators. More...
 
typedef basic_resolver_entry
< InternetProtocol > 
value_type
 The type of the value pointed to by the iterator. More...
 
typedef const
basic_resolver_entry
< InternetProtocol > * 
pointer
 The type of the result of applying operator->() to the iterator. More...
 
typedef const
basic_resolver_entry
< InternetProtocol > & 
reference
 The type of the result of applying operator*() to the iterator. More...
 
typedef std::forward_iterator_tag iterator_category
 The iterator category. More...
 

Public Member Functions

 basic_resolver_iterator ()
 Default constructor creates an end iterator. More...
 
const basic_resolver_entry
< InternetProtocol > & 
operator* () const
 Dereference an iterator. More...
 
const basic_resolver_entry
< InternetProtocol > * 
operator-> () const
 Dereference an iterator. More...
 
basic_resolver_iteratoroperator++ ()
 Increment operator (prefix). More...
 
basic_resolver_iterator operator++ (int)
 Increment operator (postfix). More...
 

Static Public Member Functions

static basic_resolver_iterator create (boost::asio::detail::addrinfo_type *address_info, const std::string &host_name, const std::string &service_name)
 Create an iterator from an addrinfo list returned by getaddrinfo. More...
 
static basic_resolver_iterator create (const typename InternetProtocol::endpoint &endpoint, const std::string &host_name, const std::string &service_name)
 Create an iterator from an endpoint, host name and service name. More...
 
template<typename EndpointIterator >
static basic_resolver_iterator create (EndpointIterator begin, EndpointIterator end, const std::string &host_name, const std::string &service_name)
 Create an iterator from a sequence of endpoints, host and service name. More...
 

Friends

bool operator== (const basic_resolver_iterator &a, const basic_resolver_iterator &b)
 Test two iterators for equality. More...
 
bool operator!= (const basic_resolver_iterator &a, const basic_resolver_iterator &b)
 Test two iterators for inequality. More...
 

Detailed Description

template<typename InternetProtocol>
class boost::asio::ip::basic_resolver_iterator< InternetProtocol >

An iterator over the entries produced by a resolver.

The boost::asio::ip::basic_resolver_iterator class template is used to define iterators over the results returned by a resolver.

The iterator's value_type, obtained when the iterator is dereferenced, is:

const basic_resolver_entry<InternetProtocol>
Thread Safety
Distinct objects: Safe.
Shared objects: Unsafe.

Member Typedef Documentation

template<typename InternetProtocol >
typedef std::ptrdiff_t boost::asio::ip::basic_resolver_iterator< InternetProtocol >::difference_type

The type used for the distance between two iterators.

template<typename InternetProtocol >
typedef std::forward_iterator_tag boost::asio::ip::basic_resolver_iterator< InternetProtocol >::iterator_category

The iterator category.

template<typename InternetProtocol >
typedef const basic_resolver_entry<InternetProtocol>* boost::asio::ip::basic_resolver_iterator< InternetProtocol >::pointer

The type of the result of applying operator->() to the iterator.

template<typename InternetProtocol >
typedef const basic_resolver_entry<InternetProtocol>& boost::asio::ip::basic_resolver_iterator< InternetProtocol >::reference

The type of the result of applying operator*() to the iterator.

template<typename InternetProtocol >
typedef basic_resolver_entry<InternetProtocol> boost::asio::ip::basic_resolver_iterator< InternetProtocol >::value_type

The type of the value pointed to by the iterator.

Constructor & Destructor Documentation

template<typename InternetProtocol >
boost::asio::ip::basic_resolver_iterator< InternetProtocol >::basic_resolver_iterator ( )
inline

Default constructor creates an end iterator.

Member Function Documentation

template<typename InternetProtocol >
static basic_resolver_iterator boost::asio::ip::basic_resolver_iterator< InternetProtocol >::create ( boost::asio::detail::addrinfo_type *  address_info,
const std::string &  host_name,
const std::string &  service_name 
)
inlinestatic

Create an iterator from an addrinfo list returned by getaddrinfo.

References boost::asio::ip::host_name().

template<typename InternetProtocol >
static basic_resolver_iterator boost::asio::ip::basic_resolver_iterator< InternetProtocol >::create ( const typename InternetProtocol::endpoint &  endpoint,
const std::string &  host_name,
const std::string &  service_name 
)
inlinestatic

Create an iterator from an endpoint, host name and service name.

template<typename InternetProtocol >
template<typename EndpointIterator >
static basic_resolver_iterator boost::asio::ip::basic_resolver_iterator< InternetProtocol >::create ( EndpointIterator  begin,
EndpointIterator  end,
const std::string &  host_name,
const std::string &  service_name 
)
inlinestatic

Create an iterator from a sequence of endpoints, host and service name.

References boost::asio::end.

template<typename InternetProtocol >
const basic_resolver_entry<InternetProtocol>& boost::asio::ip::basic_resolver_iterator< InternetProtocol >::operator* ( ) const
inline

Dereference an iterator.

template<typename InternetProtocol >
basic_resolver_iterator& boost::asio::ip::basic_resolver_iterator< InternetProtocol >::operator++ ( )
inline

Increment operator (prefix).

template<typename InternetProtocol >
basic_resolver_iterator boost::asio::ip::basic_resolver_iterator< InternetProtocol >::operator++ ( int  )
inline

Increment operator (postfix).

template<typename InternetProtocol >
const basic_resolver_entry<InternetProtocol>* boost::asio::ip::basic_resolver_iterator< InternetProtocol >::operator-> ( ) const
inline

Dereference an iterator.

Friends And Related Function Documentation

template<typename InternetProtocol >
bool operator!= ( const basic_resolver_iterator< InternetProtocol > &  a,
const basic_resolver_iterator< InternetProtocol > &  b 
)
friend

Test two iterators for inequality.

template<typename InternetProtocol >
bool operator== ( const basic_resolver_iterator< InternetProtocol > &  a,
const basic_resolver_iterator< InternetProtocol > &  b 
)
friend

Test two iterators for equality.


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