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