Realistic 3D camera system
3D camera system components
async_result.hpp
Go to the documentation of this file.
1 //
2 // async_result.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_ASYNC_RESULT_HPP
12 #define ASIO_ASYNC_RESULT_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/handler_type.hpp"
20 
22 
23 namespace asio {
24 
26 
29 template <typename Handler>
31 {
32 public:
34  typedef void type;
35 
37 
42  explicit async_result(Handler&)
43  {
44  }
45 
47  type get()
48  {
49  }
50 };
51 
52 namespace detail {
53 
54 // Helper template to deduce the true type of a handler, capture a local copy
55 // of the handler, and then create an async_result for the handler.
56 template <typename Handler, typename Signature>
58 {
59  explicit async_result_init(ASIO_MOVE_ARG(Handler) orig_handler)
60  : handler(ASIO_MOVE_CAST(Handler)(orig_handler)),
61  result(handler)
62  {
63  }
64 
67 };
68 
69 template <typename Handler, typename Signature>
71 {
72  typedef typename async_result<
75 };
76 
77 } // namespace detail
78 } // namespace asio
79 
81 
82 #if defined(GENERATING_DOCUMENTATION)
83 # define ASIO_INITFN_RESULT_TYPE(h, sig) \
84  void_or_deduced
85 #elif defined(_MSC_VER) && (_MSC_VER < 1500)
86 # define ASIO_INITFN_RESULT_TYPE(h, sig) \
87  typename ::asio::detail::async_result_type_helper<h, sig>::type
88 #else
89 # define ASIO_INITFN_RESULT_TYPE(h, sig) \
90  typename ::asio::async_result< \
91  typename ::asio::handler_type<h, sig>::type>::type
92 #endif
93 
94 #endif // ASIO_ASYNC_RESULT_HPP
async_result_init(ASIO_MOVE_ARG(Handler) orig_handler)
An interface for customising the behaviour of an initiating function.
void type
The return type of the initiating function.
asio::basic_streambuf< Allocator > CompletionCondition ASIO_MOVE_ARG(ReadHandler) handler)
Definition: read.hpp:704
handler_type< Handler, Signature >::type handler
#define ASIO_MOVE_CAST(type)
Definition: config.hpp:138
async_result< typename handler_type< Handler, Signature >::type >::type type
async_result< typename handler_type< Handler, Signature >::type > result
Handler type
The handler type for the specific signature.
async_result(Handler &)
Construct an async result from a given handler.