Statistics
| Revision:

root / tmp / org.txm.statsengine.r.core.win32 / res / win32 / library / BH / include / boost / asio / handler_type.hpp @ 2486

History | View | Annotate | Download (3.8 kB)

1 2486 sjacqu01
//
2 2486 sjacqu01
// handler_type.hpp
3 2486 sjacqu01
// ~~~~~~~~~~~~~~~~
4 2486 sjacqu01
//
5 2486 sjacqu01
// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
6 2486 sjacqu01
//
7 2486 sjacqu01
// Distributed under the Boost Software License, Version 1.0. (See accompanying
8 2486 sjacqu01
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
9 2486 sjacqu01
//
10 2486 sjacqu01
11 2486 sjacqu01
#ifndef BOOST_ASIO_HANDLER_TYPE_HPP
12 2486 sjacqu01
#define BOOST_ASIO_HANDLER_TYPE_HPP
13 2486 sjacqu01
14 2486 sjacqu01
#if defined(_MSC_VER) && (_MSC_VER >= 1200)
15 2486 sjacqu01
# pragma once
16 2486 sjacqu01
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
17 2486 sjacqu01
18 2486 sjacqu01
#include <boost/asio/detail/config.hpp>
19 2486 sjacqu01
20 2486 sjacqu01
#include <boost/asio/detail/push_options.hpp>
21 2486 sjacqu01
22 2486 sjacqu01
namespace boost {
23 2486 sjacqu01
namespace asio {
24 2486 sjacqu01
25 2486 sjacqu01
/// Default handler type traits provided for all handlers.
26 2486 sjacqu01
/**
27 2486 sjacqu01
 * The handler_type traits class is used for determining the concrete handler
28 2486 sjacqu01
 * type to be used for an asynchronous operation. It allows the handler type to
29 2486 sjacqu01
 * be determined at the point where the specific completion handler signature
30 2486 sjacqu01
 * is known.
31 2486 sjacqu01
 *
32 2486 sjacqu01
 * This template may be specialised for user-defined handler types.
33 2486 sjacqu01
 */
34 2486 sjacqu01
template <typename Handler, typename Signature>
35 2486 sjacqu01
struct handler_type
36 2486 sjacqu01
{
37 2486 sjacqu01
  /// The handler type for the specific signature.
38 2486 sjacqu01
  typedef Handler type;
39 2486 sjacqu01
};
40 2486 sjacqu01
41 2486 sjacqu01
#if !defined(GENERATING_DOCUMENTATION)
42 2486 sjacqu01
43 2486 sjacqu01
template <typename Handler, typename Signature>
44 2486 sjacqu01
struct handler_type<const Handler, Signature>
45 2486 sjacqu01
  : handler_type<Handler, Signature> {};
46 2486 sjacqu01
47 2486 sjacqu01
template <typename Handler, typename Signature>
48 2486 sjacqu01
struct handler_type<volatile Handler, Signature>
49 2486 sjacqu01
  : handler_type<Handler, Signature> {};
50 2486 sjacqu01
51 2486 sjacqu01
template <typename Handler, typename Signature>
52 2486 sjacqu01
struct handler_type<const volatile Handler, Signature>
53 2486 sjacqu01
  : handler_type<Handler, Signature> {};
54 2486 sjacqu01
55 2486 sjacqu01
template <typename Handler, typename Signature>
56 2486 sjacqu01
struct handler_type<const Handler&, Signature>
57 2486 sjacqu01
  : handler_type<Handler, Signature> {};
58 2486 sjacqu01
59 2486 sjacqu01
template <typename Handler, typename Signature>
60 2486 sjacqu01
struct handler_type<volatile Handler&, Signature>
61 2486 sjacqu01
  : handler_type<Handler, Signature> {};
62 2486 sjacqu01
63 2486 sjacqu01
template <typename Handler, typename Signature>
64 2486 sjacqu01
struct handler_type<const volatile Handler&, Signature>
65 2486 sjacqu01
  : handler_type<Handler, Signature> {};
66 2486 sjacqu01
67 2486 sjacqu01
template <typename Handler, typename Signature>
68 2486 sjacqu01
struct handler_type<Handler&, Signature>
69 2486 sjacqu01
  : handler_type<Handler, Signature> {};
70 2486 sjacqu01
71 2486 sjacqu01
#if defined(BOOST_ASIO_HAS_MOVE)
72 2486 sjacqu01
template <typename Handler, typename Signature>
73 2486 sjacqu01
struct handler_type<Handler&&, Signature>
74 2486 sjacqu01
  : handler_type<Handler, Signature> {};
75 2486 sjacqu01
#endif // defined(BOOST_ASIO_HAS_MOVE)
76 2486 sjacqu01
77 2486 sjacqu01
template <typename ReturnType, typename Signature>
78 2486 sjacqu01
struct handler_type<ReturnType(), Signature>
79 2486 sjacqu01
  : handler_type<ReturnType(*)(), Signature> {};
80 2486 sjacqu01
81 2486 sjacqu01
template <typename ReturnType, typename Arg1, typename Signature>
82 2486 sjacqu01
struct handler_type<ReturnType(Arg1), Signature>
83 2486 sjacqu01
  : handler_type<ReturnType(*)(Arg1), Signature> {};
84 2486 sjacqu01
85 2486 sjacqu01
template <typename ReturnType, typename Arg1, typename Arg2, typename Signature>
86 2486 sjacqu01
struct handler_type<ReturnType(Arg1, Arg2), Signature>
87 2486 sjacqu01
  : handler_type<ReturnType(*)(Arg1, Arg2), Signature> {};
88 2486 sjacqu01
89 2486 sjacqu01
template <typename ReturnType, typename Arg1, typename Arg2, typename Arg3,
90 2486 sjacqu01
    typename Signature>
91 2486 sjacqu01
struct handler_type<ReturnType(Arg1, Arg2, Arg3), Signature>
92 2486 sjacqu01
  : handler_type<ReturnType(*)(Arg1, Arg2, Arg3), Signature> {};
93 2486 sjacqu01
94 2486 sjacqu01
template <typename ReturnType, typename Arg1, typename Arg2, typename Arg3,
95 2486 sjacqu01
    typename Arg4, typename Signature>
96 2486 sjacqu01
struct handler_type<ReturnType(Arg1, Arg2, Arg3, Arg4), Signature>
97 2486 sjacqu01
  : handler_type<ReturnType(*)(Arg1, Arg2, Arg3, Arg4), Signature> {};
98 2486 sjacqu01
99 2486 sjacqu01
template <typename ReturnType, typename Arg1, typename Arg2, typename Arg3,
100 2486 sjacqu01
    typename Arg4, typename Arg5, typename Signature>
101 2486 sjacqu01
struct handler_type<ReturnType(Arg1, Arg2, Arg3, Arg4, Arg5), Signature>
102 2486 sjacqu01
  : handler_type<ReturnType(*)(Arg1, Arg2, Arg3, Arg4, Arg5), Signature> {};
103 2486 sjacqu01
104 2486 sjacqu01
#endif // !defined(GENERATING_DOCUMENTATION)
105 2486 sjacqu01
106 2486 sjacqu01
} // namespace asio
107 2486 sjacqu01
} // namespace boost
108 2486 sjacqu01
109 2486 sjacqu01
#include <boost/asio/detail/pop_options.hpp>
110 2486 sjacqu01
111 2486 sjacqu01
#define BOOST_ASIO_HANDLER_TYPE(h, sig) \
112 2486 sjacqu01
  typename handler_type<h, sig>::type
113 2486 sjacqu01
114 2486 sjacqu01
#endif // BOOST_ASIO_HANDLER_TYPE_HPP