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 ARCHETYPES_ASYNC_RESULT_HPP
12 #define ARCHETYPES_ASYNC_RESULT_HPP
13 
14 #include <asio/async_result.hpp>
15 #include <asio/handler_type.hpp>
16 
17 namespace archetypes {
18 
20 {
21 };
22 
24 {
26  {
27  }
28 
29  template <typename Arg1>
30  void operator()(Arg1)
31  {
32  }
33 
34  template <typename Arg1, typename Arg2>
35  void operator()(Arg1, Arg2)
36  {
37  }
38 };
39 
40 } // namespace archetypes
41 
42 namespace asio {
43 
44 template <typename Signature>
45 struct handler_type<archetypes::lazy_handler, Signature>
46 {
48 };
49 
50 template <>
51 class async_result<archetypes::concrete_handler>
52 {
53 public:
54  // The return type of the initiating function.
55  typedef int type;
56 
57  // Construct an async_result from a given handler.
59  {
60  }
61 
62  // Obtain the value to be returned from the initiating function.
63  type get()
64  {
65  return 42;
66  }
67 };
68 
69 } // namespace asio
70 
71 #endif // ARCHETYPES_ASYNC_RESULT_HPP
An interface for customising the behaviour of an initiating function.
async_result(archetypes::concrete_handler &)
Default handler type traits provided for all handlers.