Realistic 3D camera system
3D camera system components
basic_resolver_entry.hpp
Go to the documentation of this file.
1 //
2 // ip/basic_resolver_entry.hpp
3 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~
4 //
5 // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
6 //
7 // Distributed under the Boost Software License, Version 1.0. (See accompanying
8 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
9 //
10 
11 #ifndef ASIO_IP_BASIC_RESOLVER_ENTRY_HPP
12 #define ASIO_IP_BASIC_RESOLVER_ENTRY_HPP
13 
14 #if defined(_MSC_VER) && (_MSC_VER >= 1200)
15 # pragma once
16 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
17 
18 #include "asio/detail/config.hpp"
19 #include <string>
20 
22 
23 namespace asio {
24 namespace ip {
25 
27 
35 template <typename InternetProtocol>
37 {
38 public:
40  typedef InternetProtocol protocol_type;
41 
43  typedef typename InternetProtocol::endpoint endpoint_type;
44 
47  {
48  }
49 
51  basic_resolver_entry(const endpoint_type& ep,
52  const std::string& host, const std::string& service)
53  : endpoint_(ep),
54  host_name_(host),
55  service_name_(service)
56  {
57  }
58 
60  endpoint_type endpoint() const
61  {
62  return endpoint_;
63  }
64 
66  operator endpoint_type() const
67  {
68  return endpoint_;
69  }
70 
72  std::string host_name() const
73  {
74  return host_name_;
75  }
76 
78  std::string service_name() const
79  {
80  return service_name_;
81  }
82 
83 private:
84  endpoint_type endpoint_;
85  std::string host_name_;
86  std::string service_name_;
87 };
88 
89 } // namespace ip
90 } // namespace asio
91 
93 
94 #endif // ASIO_IP_BASIC_RESOLVER_ENTRY_HPP
endpoint_type endpoint() const
Get the endpoint associated with the entry.
InternetProtocol::endpoint endpoint_type
The endpoint type associated with the endpoint entry.
basic_resolver_entry(const endpoint_type &ep, const std::string &host, const std::string &service)
Construct with specified endpoint, host name and service name.
std::string host_name() const
Get the host name associated with the entry.
An entry produced by a resolver.
basic_resolver_entry()
Default constructor.
InternetProtocol protocol_type
The protocol type associated with the endpoint entry.
std::string service_name() const
Get the service name associated with the entry.