Realistic 3D camera system
3D camera system components
basic_resolver.hpp
Go to the documentation of this file.
1 //
2 // ip/basic_resolver.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_HPP
12 #define ASIO_IP_BASIC_RESOLVER_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 "asio/basic_io_object.hpp"
22 #include "asio/error.hpp"
26 
28 
29 namespace asio {
30 namespace ip {
31 
33 
41 template <typename InternetProtocol,
42  typename ResolverService = resolver_service<InternetProtocol> >
44  : public basic_io_object<ResolverService>
45 {
46 public:
48  typedef InternetProtocol protocol_type;
49 
51  typedef typename InternetProtocol::endpoint endpoint_type;
52 
55 
58 
60 
67  : basic_io_object<ResolverService>(io_service)
68  {
69  }
70 
72 
77  void cancel()
78  {
79  return this->service.cancel(this->implementation);
80  }
81 
83 
98  iterator resolve(const query& q)
99  {
100  asio::error_code ec;
101  iterator i = this->service.resolve(this->implementation, q, ec);
102  asio::detail::throw_error(ec, "resolve");
103  return i;
104  }
105 
107 
123  iterator resolve(const query& q, asio::error_code& ec)
124  {
125  return this->service.resolve(this->implementation, q, ec);
126  }
127 
129 
154  template <typename ResolveHandler>
155  ASIO_INITFN_RESULT_TYPE(ResolveHandler,
156  void (asio::error_code, iterator))
157  async_resolve(const query& q,
158  ASIO_MOVE_ARG(ResolveHandler) handler)
159  {
160  // If you get an error on the following line it means that your handler does
161  // not meet the documented type requirements for a ResolveHandler.
163  ResolveHandler, handler, iterator) type_check;
164 
165  return this->service.async_resolve(this->implementation, q,
166  ASIO_MOVE_CAST(ResolveHandler)(handler));
167  }
168 
170 
187  iterator resolve(const endpoint_type& e)
188  {
189  asio::error_code ec;
190  iterator i = this->service.resolve(this->implementation, e, ec);
191  asio::detail::throw_error(ec, "resolve");
192  return i;
193  }
194 
196 
214  iterator resolve(const endpoint_type& e, asio::error_code& ec)
215  {
216  return this->service.resolve(this->implementation, e, ec);
217  }
218 
221 
247  template <typename ResolveHandler>
248  ASIO_INITFN_RESULT_TYPE(ResolveHandler,
249  void (asio::error_code, iterator))
250  async_resolve(const endpoint_type& e,
251  ASIO_MOVE_ARG(ResolveHandler) handler)
252  {
253  // If you get an error on the following line it means that your handler does
254  // not meet the documented type requirements for a ResolveHandler.
256  ResolveHandler, handler, iterator) type_check;
257 
258  return this->service.async_resolve(this->implementation, e,
259  ASIO_MOVE_CAST(ResolveHandler)(handler));
260  }
261 };
262 
263 } // namespace ip
264 } // namespace asio
265 
267 
268 #endif // ASIO_IP_BASIC_RESOLVER_HPP
InternetProtocol::endpoint endpoint_type
The endpoint type.
basic_resolver_query< InternetProtocol > query
The query type.
ASIO_MOVE_ARG(ResolveHandler) handler)
void throw_error(const asio::error_code &err)
Definition: throw_error.hpp:31
An query to be passed to a resolver.
Provides core I/O functionality.
Definition: io_service.hpp:184
pylon Camera Software Suite for Linux for Use with Basler Gigabit the pylon Viewer and the IP Configurator applications might not be available System I340 and I350 series Although the pylon software will work with any GigE network we would recommend to use one of these adapters USB For U3V devices a USB3 capable USB controller is necessary For best performance and stability we highly recommend a kernel the following settings should be i e
Base class for all I/O objects.
iterator resolve(const query &q)
Perform forward resolution of a query to a list of entries.
#define ASIO_RESOLVE_HANDLER_CHECK(handler_type, handler, iter_type)
iterator resolve(const endpoint_type &e, asio::error_code &ec)
Perform reverse resolution of an endpoint to a list of entries.
ASIO_INITFN_RESULT_TYPE(ResolveHandler, void(asio::error_code, iterator)) async_resolve(const query &q
Asynchronously perform forward resolution of a query to a list of entries.
basic_resolver_iterator< InternetProtocol > iterator
The iterator type.
Class to represent an error code value.
Definition: error_code.hpp:80
InternetProtocol protocol_type
The protocol type.
iterator resolve(const query &q, asio::error_code &ec)
Perform forward resolution of a query to a list of entries.
void cancel()
Cancel any asynchronous operations that are waiting on the resolver.
Provides endpoint resolution functionality.
An iterator over the entries produced by a resolver.
basic_resolver(asio::io_service &io_service)
Constructor.
#define ASIO_MOVE_CAST(type)
Definition: config.hpp:138
iterator resolve(const endpoint_type &e)
Perform reverse resolution of an endpoint to a list of entries.