Realistic 3D camera system
3D camera system components
winrt_async_op.hpp
Go to the documentation of this file.
1 //
2 // detail/winrt_async_op.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_DETAIL_WINRT_ASYNC_OP_HPP
12 #define ASIO_DETAIL_WINRT_ASYNC_OP_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"
20 
22 
23 namespace asio {
24 namespace detail {
25 
26 template <typename TResult>
28  : public operation
29 {
30 public:
31  // The error code to be passed to the completion handler.
33 
34  // The result of the operation, to be passed to the completion handler.
35  TResult result_;
36 
37 protected:
38  winrt_async_op(func_type complete_func)
39  : operation(complete_func),
40  result_()
41  {
42  }
43 };
44 
45 template <>
46 class winrt_async_op<void>
47  : public operation
48 {
49 public:
50  // The error code to be passed to the completion handler.
52 
53 protected:
54  winrt_async_op(func_type complete_func)
55  : operation(complete_func)
56  {
57  }
58 };
59 
60 } // namespace detail
61 } // namespace asio
62 
64 
65 #endif // ASIO_DETAIL_WINRT_ASYNC_OP_HPP
winrt_async_op(func_type complete_func)
Class to represent an error code value.
Definition: error_code.hpp:80
task_io_service_operation operation
Definition: operation.hpp:32
winrt_async_op(func_type complete_func)