Remote Call Framework 3.3
AsioFwd.hpp
1 
2 //******************************************************************************
3 // RCF - Remote Call Framework
4 //
5 // Copyright (c) 2005 - 2022, Delta V Software. All rights reserved.
6 // https://www.deltavsoft.com
7 //
8 // RCF is distributed under dual licenses - closed source or GPL.
9 // Consult your particular license for conditions of use.
10 //
11 // If you have not purchased a commercial license, you are using RCF under GPL terms.
12 //
13 // Version: 3.3
14 // Contact: support <at> deltavsoft.com
15 //
16 //******************************************************************************
17 
18 #ifndef INCLUDE_RCF_ASIOFWD_HPP
19 #define INCLUDE_RCF_ASIOFWD_HPP
20 
21 #include <RCF/Config.hpp>
22 
23 #include <memory>
24 #include <system_error>
25 
26 namespace boost {
27  namespace posix_time {
28  class ptime;
29  }
30 }
31 
32 #ifdef RCF_USE_BOOST_ASIO
33 
34 //------------------------------------------------------------------------------
35 // Use Boost.Asio
36 
37 #define ASIO_NS boost::asio
38 
39 namespace boost {
40 namespace asio {
41 
42  class io_service;
43 
44  namespace windows {
45  template<typename T> class basic_stream_handle;
46 
47  class stream_handle_service;
48  typedef basic_stream_handle<stream_handle_service> stream_handle;
49  }
50 
51 }
52 namespace system {
53  class error_code;
54 }
55 }
56 namespace RCF {
57  typedef boost::system::error_code AsioErrorCode;
58 };
59 
60 //------------------------------------------------------------------------------
61 
62 #else
63 
64 //------------------------------------------------------------------------------
65 // Use internal Asio
66 
67 #define ASIO_NS asio
68 
69 namespace asio {
70 
71  class io_service;
72  typedef std::error_code error_code;
73 
74  namespace windows {
75  template<typename T> class basic_stream_handle;
76 
77  class stream_handle_service;
78  typedef basic_stream_handle<stream_handle_service> stream_handle;
79  }
80 
81 }
82 namespace RCF {
83  typedef asio::error_code AsioErrorCode;
84 };
85 
86 //------------------------------------------------------------------------------
87 
88 #endif
89 
90 namespace RCF {
91 
92  typedef ASIO_NS::io_service AsioIoService;
93  typedef std::shared_ptr<AsioIoService> AsioIoServicePtr;
94 
95  typedef ASIO_NS::windows::stream_handle AsioPipeHandle;
96  typedef std::shared_ptr<AsioPipeHandle> AsioPipeHandlePtr;
97 
98  class AsioTimer;
99  typedef std::shared_ptr<AsioTimer> AsioTimerPtr;
100 
101  class AsioBuffers;
102  typedef std::shared_ptr<AsioBuffers> AsioBuffersPtr;
103 
104 } // namespace RCF
105 
106 #endif // ! INCLUDE_RCF_ASIOFWD_HPP
Definition: AsioFwd.hpp:26
Definition: AmiIoHandler.hpp:23
Definition: AsioFwd.hpp:69