| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent bad1c79 commit 412127d
6 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -348,7 +348,7 @@ auto Transform(const Events<D,TIn>& source, const SignalPack<D,TDepValues...>& d | |||
| 348 | 348 | /// Process | |
| 349 | 349 | /////////////////////////////////////////////////////////////////////////////////////////////////// | |
| 350 | 350 | using REACT_IMPL::EventRange; | |
| 351 | - using REACT_IMPL::EventInserter; | ||
| 351 | + using REACT_IMPL::EventEmitter; | ||
| 352 | 352 | ||
| 353 | 353 | template | |
| 354 | 354 | < | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -933,7 +933,7 @@ bool Equals(const Signal<D,L>& lhs, const Signal<D,R>& rhs) | |||
| 933 | 933 | REACT_IMPL::Identity<decltype(obj)>::Type::ValueT& r) \ | |
| 934 | 934 | { \ | |
| 935 | 935 | using T = decltype(r.name); \ | |
| 936 | - using S = REACT_MSVC_NO_TYPENAME REACT::RemoveInput<T>::Type; \ | ||
| 936 | + using S = REACT_MSVC_NO_TYPENAME REACT::DecayInput<T>::Type; \ | ||
| 937 | 937 | return static_cast<S>(r.name); \ | |
| 938 | 938 | })) | |
| 939 | 939 | ||
@@ -946,7 +946,7 @@ bool Equals(const Signal<D,L>& lhs, const Signal<D,R>& rhs) | |||
| 946 | 946 | { \ | |
| 947 | 947 | assert(r != nullptr); \ | |
| 948 | 948 | using T = decltype(r->name); \ | |
| 949 | - using S = REACT_MSVC_NO_TYPENAME REACT::RemoveInput<T>::Type; \ | ||
| 949 | + using S = REACT_MSVC_NO_TYPENAME REACT::DecayInput<T>::Type; \ | ||
| 950 | 950 | return static_cast<S>(r->name); \ | |
| 951 | 951 | })) | |
| 952 | 952 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -94,6 +94,30 @@ struct IsContinuation { static const bool value = false; }; | |||
| 94 | 94 | template <typename D, typename D2> | |
| 95 | 95 | struct IsContinuation<Continuation<D,D2>> { static const bool value = true; }; | |
| 96 | 96 | ||
| 97 | + /////////////////////////////////////////////////////////////////////////////////////////////////// | ||
| 98 | + /// IsObservable | ||
| 99 | + /////////////////////////////////////////////////////////////////////////////////////////////////// | ||
| 100 | + template <typename T> | ||
| 101 | + struct IsObservable { static const bool value = false; }; | ||
| 102 | + | ||
| 103 | + template <typename D, typename T> | ||
| 104 | + struct IsObservable<Signal<D,T>> { static const bool value = true; }; | ||
| 105 | + | ||
| 106 | + template <typename D, typename T> | ||
| 107 | + struct IsObservable<VarSignal<D,T>> { static const bool value = true; }; | ||
| 108 | + | ||
| 109 | + template <typename D, typename T, typename TOp> | ||
| 110 | + struct IsObservable<TempSignal<D,T,TOp>> { static const bool value = true; }; | ||
| 111 | + | ||
| 112 | + template <typename D, typename T> | ||
| 113 | + struct IsObservable<Events<D,T>> { static const bool value = true; }; | ||
| 114 | + | ||
| 115 | + template <typename D, typename T> | ||
| 116 | + struct IsObservable<EventSource<D,T>> { static const bool value = true; }; | ||
| 117 | + | ||
| 118 | + template <typename D, typename T, typename TOp> | ||
| 119 | + struct IsObservable<TempEvents<D,T,TOp>> { static const bool value = true; }; | ||
| 120 | + | ||
| 97 | 121 | /////////////////////////////////////////////////////////////////////////////////////////////////// | |
| 98 | 122 | /// IsReactive | |
| 99 | 123 | /////////////////////////////////////////////////////////////////////////////////////////////////// | |
@@ -128,16 +152,16 @@ template <typename D, typename D2> | |||
| 128 | 152 | struct IsReactive<Continuation<D,D2>> { static const bool value = true; }; | |
| 129 | 153 | ||
| 130 | 154 | /////////////////////////////////////////////////////////////////////////////////////////////////// | |
| 131 | - /// RemoveInput | ||
| 155 | + /// DecayInput | ||
| 132 | 156 | /////////////////////////////////////////////////////////////////////////////////////////////////// | |
| 133 | 157 | template <typename T> | |
| 134 | - struct RemoveInput { using Type = T; }; | ||
| 158 | + struct DecayInput { using Type = T; }; | ||
| 135 | 159 | ||
| 136 | 160 | template <typename D, typename T> | |
| 137 | - struct RemoveInput<VarSignal<D,T>> { using Type = Signal<D,T>; }; | ||
| 161 | + struct DecayInput<VarSignal<D,T>> { using Type = Signal<D,T>; }; | ||
| 138 | 162 | ||
| 139 | 163 | template <typename D, typename T> | |
| 140 | - struct RemoveInput<EventSource<D,T>> { using Type = Events<D,T>; }; | ||
| 164 | + struct DecayInput<EventSource<D,T>> { using Type = Events<D,T>; }; | ||
| 141 | 165 | ||
| 142 | 166 | /******************************************/ REACT_END /******************************************/ | |
| 143 | 167 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -255,8 +255,12 @@ class EventRange | |||
| 255 | 255 | using const_iterator = typename std::vector<E>::const_iterator; | |
| 256 | 256 | using size_type = typename std::vector<E>::size_type; | |
| 257 | 257 | ||
| 258 | + // Copy ctor | ||
| 258 | 259 | EventRange(const EventRange&) = default; | |
| 259 | 260 | ||
| 261 | + // Copy assignment | ||
| 262 | + EventRange& operator=(const EventRange&) = default; | ||
| 263 | + | ||
| 260 | 264 | const_iterator begin() const { return data_.begin(); } | |
| 261 | 265 | const_iterator end() const { return data_.end(); } | |
| 262 | 266 | ||
@@ -272,7 +276,7 @@ class EventRange | |||
| 272 | 276 | }; | |
| 273 | 277 | ||
| 274 | 278 | template <typename E> | |
| 275 | - using EventInserter = std::back_insert_iterator<std::vector<E>>; | ||
| 279 | + using EventEmitter = std::back_insert_iterator<std::vector<E>>; | ||
| 276 | 280 | ||
| 277 | 281 | /****************************************/ REACT_IMPL_END /***************************************/ | |
| 278 | 282 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -285,7 +285,7 @@ TYPED_TEST_P(EventStreamTest, EventProcess) | |||
| 285 | 285 | int callCount = 0; | |
| 286 | 286 | ||
| 287 | 287 | auto processed = Process<float>(merged, | |
| 288 | - [&] (EventRange<int> range, EventInserter<float> out) | ||
| 288 | + [&] (EventRange<int> range, EventEmitter<float> out) | ||
| 289 | 289 | { | |
| 290 | 290 | for (const auto& e : range) | |
| 291 | 291 | { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -911,7 +911,7 @@ TYPED_TEST_P(OperationsTest, SyncedEventProcess1) | |||
| 911 | 911 | ||
| 912 | 912 | auto processed = Process<float>(merged, | |
| 913 | 913 | With(mult), | |
| 914 | - [&] (EventRange<int> range, EventInserter<float> out, int mult) | ||
| 914 | + [&] (EventRange<int> range, EventEmitter<float> out, int mult) | ||
| 915 | 915 | { | |
| 916 | 916 | for (const auto& e : range) | |
| 917 | 917 | { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments