1 2 // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 3 4 #pragma once 5 6 #if !defined(RXCPP_RX_SOURCES_HPP) 7 #define RXCPP_RX_SOURCES_HPP 8 9 #include "rx-includes.hpp" 10 11 namespace rxcpp { 12 13 namespace sources { 14 15 struct tag_source {}; 16 template<class T> 17 struct source_base 18 { 19 typedef T value_type; 20 typedef tag_source source_tag; 21 }; 22 template<class T> 23 class is_source 24 { 25 template<class C> 26 static typename C::source_tag* check(int); 27 template<class C> 28 static void check(...); 29 public: 30 static const bool value = std::is_convertible<decltype(check<rxu::decay_t<T>>(0)), tag_source*>::value; 31 }; 32 33 } 34 namespace rxs=sources; 35 36 } 37 38 #include "sources/rx-create.hpp" 39 #include "sources/rx-range.hpp" 40 #include "sources/rx-iterate.hpp" 41 #include "sources/rx-interval.hpp" 42 #include "sources/rx-empty.hpp" 43 #include "sources/rx-defer.hpp" 44 #include "sources/rx-never.hpp" 45 #include "sources/rx-error.hpp" 46 #include "sources/rx-scope.hpp" 47 #include "sources/rx-timer.hpp" 48 49 #endif 50