• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
2 
3 #pragma once
4 
5 #if !defined(RXCPP_RX_INCLUDES_HPP)
6 #define RXCPP_RX_INCLUDES_HPP
7 
8 #include "rx-trace.hpp"
9 
10 // some configuration macros
11 #if defined(_MSC_VER)
12 
13 #if _MSC_VER > 1600
14 #pragma warning(disable: 4348) // false positives on : redefinition of default parameter : parameter 2
15 #define RXCPP_USE_RVALUEREF 1
16 #endif
17 
18 #if _MSC_VER >= 1800
19 #define RXCPP_USE_VARIADIC_TEMPLATES 1
20 #endif
21 
22 #if _CPPRTTI
23 #define RXCPP_USE_RTTI 1
24 #endif
25 
26 #if _HAS_EXCEPTIONS
27 #define RXCPP_USE_EXCEPTIONS 1
28 #endif
29 
30 #define RXCPP_NORETURN __declspec(noreturn)
31 
32 #elif defined(__clang__)
33 
34 #if __has_feature(cxx_rvalue_references)
35 #define RXCPP_USE_RVALUEREF 1
36 #endif
37 #if __has_feature(cxx_rtti)
38 #define RXCPP_USE_RTTI 1
39 #endif
40 #if __has_feature(cxx_variadic_templates)
41 #define RXCPP_USE_VARIADIC_TEMPLATES 1
42 #endif
43 #if __has_feature(cxx_exceptions)
44 #define RXCPP_USE_EXCEPTIONS 1
45 #endif
46 
47 #if __has_feature(cxx_attributes)
48 #define RXCPP_NORETURN [[noreturn]]
49 #else
50 #define RXCPP_NORETURN __attribute__ ((noreturn))
51 #endif
52 
53 #elif defined(__GNUG__)
54 
55 #define GCC_VERSION (__GNUC__ * 10000 + \
56                      __GNUC_MINOR__ * 100 + \
57                      __GNUC_PATCHLEVEL__)
58 
59 #if GCC_VERSION >= 40801
60 #define RXCPP_USE_RVALUEREF 1
61 #endif
62 
63 #if GCC_VERSION >= 40400
64 #define RXCPP_USE_VARIADIC_TEMPLATES 1
65 #endif
66 
67 #if defined(__GXX_RTTI)
68 #define RXCPP_USE_RTTI 1
69 #endif
70 
71 #if defined(__EXCEPTIONS)
72 #define RXCPP_USE_EXCEPTIONS 1
73 #endif
74 
75 #define RXCPP_NORETURN __attribute__ ((noreturn))
76 
77 #endif
78 
79 //
80 // control std::hash<> of enum
81 // force with RXCPP_FORCE_HASH_ENUM & RXCPP_FORCE_HASH_ENUM_UNDERLYING
82 // in time use ifdef to detect library support for std::hash<> of enum
83 //
84 #define RXCPP_HASH_ENUM 0
85 #define RXCPP_HASH_ENUM_UNDERLYING 1
86 
87 #if !defined(WINAPI_FAMILY) || (WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP)
88 #define RXCPP_USE_WINRT 0
89 #else
90 #define RXCPP_USE_WINRT 1
91 #endif
92 
93 #if defined(__APPLE__) && defined(__MACH__)
94 #include <TargetConditionals.h>
95 #if (TARGET_OS_IPHONE == 1) || (TARGET_IPHONE_SIMULATOR == 1)
96 #define RXCPP_ON_IOS
97 #endif
98 #endif
99 
100 #if defined(__ANDROID__)
101 #define RXCPP_ON_ANDROID
102 #endif
103 
104 #if defined(RXCPP_FORCE_USE_VARIADIC_TEMPLATES)
105 #undef RXCPP_USE_VARIADIC_TEMPLATES
106 #define RXCPP_USE_VARIADIC_TEMPLATES RXCPP_FORCE_USE_VARIADIC_TEMPLATES
107 #endif
108 
109 #if defined(RXCPP_FORCE_USE_RVALUEREF)
110 #undef RXCPP_USE_RVALUEREF
111 #define RXCPP_USE_RVALUEREF RXCPP_FORCE_USE_RVALUEREF
112 #endif
113 
114 #if defined(RXCPP_FORCE_USE_RTTI)
115 #undef RXCPP_USE_RTTI
116 #define RXCPP_USE_RTTI RXCPP_FORCE_USE_RTTI
117 #endif
118 
119 #if defined(RXCPP_FORCE_USE_EXCEPTIONS)
120 #undef RXCPP_USE_EXCEPTIONS
121 #define RXCPP_USE_EXCEPTIONS RXCPP_FORCE_USE_EXCEPTIONS
122 #endif
123 
124 #if defined(RXCPP_FORCE_USE_WINRT)
125 #undef RXCPP_USE_WINRT
126 #define RXCPP_USE_WINRT RXCPP_FORCE_USE_WINRT
127 #endif
128 
129 #if defined(RXCPP_FORCE_HASH_ENUM)
130 #undef RXCPP_HASH_ENUM
131 #define RXCPP_HASH_ENUM RXCPP_FORCE_HASH_ENUM
132 #endif
133 
134 #if defined(RXCPP_FORCE_HASH_ENUM_UNDERLYING)
135 #undef RXCPP_HASH_ENUM_UNDERLYING
136 #define RXCPP_HASH_ENUM_UNDERLYING RXCPP_FORCE_HASH_ENUM_UNDERLYING
137 #endif
138 
139 #if defined(RXCPP_FORCE_ON_IOS)
140 #undef RXCPP_ON_IOS
141 #define RXCPP_ON_IOS RXCPP_FORCE_ON_IOS
142 #endif
143 
144 #if defined(RXCPP_FORCE_ON_ANDROID)
145 #undef RXCPP_ON_ANDROID
146 #define RXCPP_ON_ANDROID RXCPP_FORCE_ON_ANDROID
147 #endif
148 
149 #if defined(_MSC_VER) && !RXCPP_USE_VARIADIC_TEMPLATES
150 // resolve args needs enough to store all the possible resolved args
151 #define _VARIADIC_MAX 10
152 #endif
153 
154 #if defined(_MSC_VER) && (_MSC_VER <= 1800)
155 #define RXCPP_NOEXCEPT
156 #else
157 #define RXCPP_NOEXCEPT noexcept
158 #endif
159 
160 #pragma push_macro("min")
161 #pragma push_macro("max")
162 #undef min
163 #undef max
164 
165 #include <stdlib.h>
166 
167 #include <cstddef>
168 
169 #include <iostream>
170 #include <iomanip>
171 
172 #include <exception>
173 #include <functional>
174 #include <memory>
175 #include <array>
176 #include <vector>
177 #include <algorithm>
178 #include <atomic>
179 #include <map>
180 #include <set>
181 #include <mutex>
182 #include <deque>
183 #include <thread>
184 #include <future>
185 #include <list>
186 #include <queue>
187 #include <chrono>
188 #include <condition_variable>
189 #include <initializer_list>
190 #include <typeinfo>
191 #include <tuple>
192 #include <unordered_set>
193 #include <type_traits>
194 #include <utility>
195 
196 #if defined(RXCPP_ON_IOS) || defined(RXCPP_ON_ANDROID)
197 #include <pthread.h>
198 #endif
199 
200 #include "rx-util.hpp"
201 #include "rx-predef.hpp"
202 #include "rx-subscription.hpp"
203 #include "rx-observer.hpp"
204 #include "rx-scheduler.hpp"
205 #include "rx-subscriber.hpp"
206 #include "rx-notification.hpp"
207 #include "rx-coordination.hpp"
208 #include "rx-sources.hpp"
209 #include "rx-subjects.hpp"
210 #include "rx-operators.hpp"
211 #include "rx-observable.hpp"
212 #include "rx-connectable_observable.hpp"
213 #include "rx-grouped_observable.hpp"
214 
215 #if !defined(RXCPP_LITE)
216 #include "operators/rx-all.hpp"
217 #include "operators/rx-amb.hpp"
218 #include "operators/rx-any.hpp"
219 #include "operators/rx-buffer_count.hpp"
220 #include "operators/rx-buffer_time.hpp"
221 #include "operators/rx-buffer_time_count.hpp"
222 #include "operators/rx-combine_latest.hpp"
223 #include "operators/rx-concat.hpp"
224 #include "operators/rx-concat_map.hpp"
225 #include "operators/rx-connect_forever.hpp"
226 #include "operators/rx-debounce.hpp"
227 #include "operators/rx-delay.hpp"
228 #include "operators/rx-distinct.hpp"
229 #include "operators/rx-distinct_until_changed.hpp"
230 #include "operators/rx-element_at.hpp"
231 #include "operators/rx-filter.hpp"
232 #include "operators/rx-finally.hpp"
233 #include "operators/rx-flat_map.hpp"
234 #include "operators/rx-group_by.hpp"
235 #include "operators/rx-ignore_elements.hpp"
236 #include "operators/rx-map.hpp"
237 #include "operators/rx-merge.hpp"
238 #include "operators/rx-merge_delay_error.hpp"
239 #include "operators/rx-observe_on.hpp"
240 #include "operators/rx-on_error_resume_next.hpp"
241 #include "operators/rx-pairwise.hpp"
242 #include "operators/rx-reduce.hpp"
243 #include "operators/rx-repeat.hpp"
244 #include "operators/rx-replay.hpp"
245 #include "operators/rx-retry.hpp"
246 #include "operators/rx-sample_time.hpp"
247 #include "operators/rx-scan.hpp"
248 #include "operators/rx-sequence_equal.hpp"
249 #include "operators/rx-skip.hpp"
250 #include "operators/rx-skip_while.hpp"
251 #include "operators/rx-skip_last.hpp"
252 #include "operators/rx-skip_until.hpp"
253 #include "operators/rx-start_with.hpp"
254 #include "operators/rx-subscribe_on.hpp"
255 #include "operators/rx-switch_if_empty.hpp"
256 #include "operators/rx-switch_on_next.hpp"
257 #include "operators/rx-take.hpp"
258 #include "operators/rx-take_last.hpp"
259 #include "operators/rx-take_until.hpp"
260 #include "operators/rx-take_while.hpp"
261 #include "operators/rx-tap.hpp"
262 #include "operators/rx-time_interval.hpp"
263 #include "operators/rx-timeout.hpp"
264 #include "operators/rx-timestamp.hpp"
265 #include "operators/rx-window.hpp"
266 #include "operators/rx-window_time.hpp"
267 #include "operators/rx-window_time_count.hpp"
268 #include "operators/rx-window_toggle.hpp"
269 #include "operators/rx-with_latest_from.hpp"
270 #include "operators/rx-zip.hpp"
271 #endif
272 
273 #pragma pop_macro("min")
274 #pragma pop_macro("max")
275 
276 #endif
277