| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 5b96e23 commit 61351b6
46 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -4,6 +4,9 @@ | |||
| 4 | 4 | // (See accompanying file LICENSE_1_0.txt or copy at | |
| 5 | 5 | // http://www.boost.org/LICENSE_1_0.txt) | |
| 6 | 6 | ||
| 7 | + #ifndef REACT_ALGORITHM_H_INCLUDED | ||
| 8 | + #define REACT_ALGORITHM_H_INCLUDED | ||
| 9 | + | ||
| 7 | 10 | #pragma once | |
| 8 | 11 | ||
| 9 | 12 | #include "react/detail/Defs.h" | |
@@ -45,17 +48,18 @@ template | |||
| 45 | 48 | typename E, | |
| 46 | 49 | typename V, | |
| 47 | 50 | typename FIn, | |
| 48 | - typename S = std::decay<V>::type | ||
| 51 | + typename S = typename std::decay<V>::type | ||
| 49 | 52 | > | |
| 50 | 53 | auto Iterate(const Events<D,E>& events, V&& init, FIn&& func) | |
| 51 | 54 | -> Signal<D,S> | |
| 52 | 55 | { | |
| 53 | 56 | using REACT_IMPL::IterateNode; | |
| 54 | 57 | using REACT_IMPL::IterateByRefNode; | |
| 55 | 58 | ||
| 56 | - using F = std::decay<FIn>::type; | ||
| 57 | - using TNode = std::conditional< | ||
| 58 | - std::is_same<void,std::result_of<F(E,S)>::type>::value, | ||
| 59 | + using F = typename std::decay<FIn>::type; | ||
| 60 | + using TNode = typename std::conditional< | ||
| 61 | + std::is_same<void, | ||
| 62 | + typename std::result_of<F(E,S)>::type>::value, | ||
| 59 | 63 | IterateByRefNode<D,S,E,F>, | |
| 60 | 64 | IterateNode<D,S,E,F> | |
| 61 | 65 | >::type; | |
@@ -75,7 +79,7 @@ template | |||
| 75 | 79 | typename V, | |
| 76 | 80 | typename FIn, | |
| 77 | 81 | typename ... TDepValues, | |
| 78 | - typename S = std::decay<V>::type | ||
| 82 | + typename S = typename std::decay<V>::type | ||
| 79 | 83 | > | |
| 80 | 84 | auto Iterate(const Events<D,E>& events, V&& init, | |
| 81 | 85 | const SignalPack<D,TDepValues...>& depPack, FIn&& func) | |
@@ -84,9 +88,10 @@ auto Iterate(const Events<D,E>& events, V&& init, | |||
| 84 | 88 | using REACT_IMPL::SyncedIterateNode; | |
| 85 | 89 | using REACT_IMPL::SyncedIterateByRefNode; | |
| 86 | 90 | ||
| 87 | - using F = std::decay<FIn>::type; | ||
| 88 | - using TNode = std::conditional< | ||
| 89 | - std::is_same<void,std::result_of<F(E,S,TDepValues...)>::type>::value, | ||
| 91 | + using F = typename std::decay<FIn>::type; | ||
| 92 | + using TNode = typename std::conditional< | ||
| 93 | + std::is_same<void, | ||
| 94 | + typename std::result_of<F(E,S,TDepValues...)>::type>::value, | ||
| 90 | 95 | SyncedIterateByRefNode<D,S,E,F,TDepValues ...>, | |
| 91 | 96 | SyncedIterateNode<D,S,E,F,TDepValues ...> | |
| 92 | 97 | >::type; | |
@@ -125,7 +130,7 @@ template | |||
| 125 | 130 | < | |
| 126 | 131 | typename D, | |
| 127 | 132 | typename V, | |
| 128 | - typename T = std::decay<V>::type | ||
| 133 | + typename T = typename std::decay<V>::type | ||
| 129 | 134 | > | |
| 130 | 135 | auto Hold(const Events<D,T>& events, V&& init) | |
| 131 | 136 | -> Signal<D,T> | |
@@ -214,7 +219,7 @@ template | |||
| 214 | 219 | < | |
| 215 | 220 | typename D, | |
| 216 | 221 | typename V, | |
| 217 | - typename S = std::decay<V>::type | ||
| 222 | + typename S = typename std::decay<V>::type | ||
| 218 | 223 | > | |
| 219 | 224 | auto OnChangedTo(const Signal<D,S>& target, V&& value) | |
| 220 | 225 | -> Events<D,Token> | |
@@ -225,3 +230,5 @@ auto OnChangedTo(const Signal<D,S>& target, V&& value) | |||
| 225 | 230 | } | |
| 226 | 231 | ||
| 227 | 232 | /******************************************/ REACT_END /******************************************/ | |
| 233 | + | ||
| 234 | + #endif // REACT_ALGORITHM_H_INCLUDED | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -4,11 +4,21 @@ | |||
| 4 | 4 | // (See accompanying file LICENSE_1_0.txt or copy at | |
| 5 | 5 | // http://www.boost.org/LICENSE_1_0.txt) | |
| 6 | 6 | ||
| 7 | + #ifndef REACT_DOMAIN_H_INCLUDED | ||
| 8 | + #define REACT_DOMAIN_H_INCLUDED | ||
| 9 | + | ||
| 7 | 10 | #pragma once | |
| 8 | 11 | ||
| 9 | 12 | #include "react/detail/Defs.h" | |
| 10 | 13 | ||
| 14 | + #include <utility> | ||
| 15 | + #include <type_traits> | ||
| 16 | + | ||
| 11 | 17 | #include "react/TypeTraits.h" | |
| 18 | + | ||
| 19 | + #include "react/detail/EventFwd.h" | ||
| 20 | + #include "react/detail/SignalFwd.h" | ||
| 21 | + | ||
| 12 | 22 | #include "react/detail/ReactiveInput.h" | |
| 13 | 23 | #include "react/detail/Options.h" | |
| 14 | 24 | ||
@@ -34,26 +44,6 @@ class Observer; | |||
| 34 | 44 | template <typename D> | |
| 35 | 45 | class ScopedObserver; | |
| 36 | 46 | ||
| 37 | - template <typename D, typename S> | ||
| 38 | - class Signal; | ||
| 39 | - | ||
| 40 | - template <typename D, typename S> | ||
| 41 | - class VarSignal; | ||
| 42 | - | ||
| 43 | - template <typename D, typename S, typename TOp> | ||
| 44 | - class TempSignal; | ||
| 45 | - | ||
| 46 | - template <typename D, typename E> | ||
| 47 | - class Events; | ||
| 48 | - | ||
| 49 | - template <typename D, typename E> | ||
| 50 | - class EventSource; | ||
| 51 | - | ||
| 52 | - template <typename D, typename E, typename TOp> | ||
| 53 | - class TempEvents; | ||
| 54 | - | ||
| 55 | - enum class Token; | ||
| 56 | - | ||
| 57 | 47 | using REACT_IMPL::TurnFlagsT; | |
| 58 | 48 | ||
| 59 | 49 | #ifdef REACT_ENABLE_LOGGING | |
@@ -113,8 +103,8 @@ class DomainBase | |||
| 113 | 103 | template | |
| 114 | 104 | < | |
| 115 | 105 | typename V, | |
| 116 | - typename S = std::decay<V>::type, | ||
| 117 | - class = std::enable_if< | ||
| 106 | + typename S = typename std::decay<V>::type, | ||
| 107 | + class = typename std::enable_if< | ||
| 118 | 108 | !IsSignal<S>::value>::type | |
| 119 | 109 | > | |
| 120 | 110 | static auto MakeVar(V&& value) | |
@@ -129,9 +119,9 @@ class DomainBase | |||
| 129 | 119 | template | |
| 130 | 120 | < | |
| 131 | 121 | typename V, | |
| 132 | - typename S = std::decay<V>::type, | ||
| 133 | - typename TInner = S::ValueT, | ||
| 134 | - class = std::enable_if< | ||
| 122 | + typename S = typename std::decay<V>::type, | ||
| 123 | + typename TInner = typename S::ValueT, | ||
| 124 | + class = typename std::enable_if< | ||
| 135 | 125 | IsSignal<S>::value>::type | |
| 136 | 126 | > | |
| 137 | 127 | static auto MakeVar(V&& value) | |
@@ -212,7 +202,7 @@ class DomainInitializer | |||
| 212 | 202 | D::Log(); | |
| 213 | 203 | #endif //REACT_ENABLE_LOGGING | |
| 214 | 204 | ||
| 215 | - typename D::Engine::Engine(); | ||
| 205 | + D::Engine::Engine(); | ||
| 216 | 206 | } | |
| 217 | 207 | }; | |
| 218 | 208 | ||
@@ -223,4 +213,6 @@ class DomainInitializer | |||
| 223 | 213 | /////////////////////////////////////////////////////////////////////////////////////////////////// | |
| 224 | 214 | #define REACTIVE_DOMAIN(name, ...) \ | |
| 225 | 215 | struct name : public REACT::DomainBase<name, REACT_IMPL::DomainPolicy<__VA_ARGS__ >> {}; \ | |
| 226 | - REACT_IMPL::DomainInitializer< name > name ## _initializer_; | ||
| 216 | + REACT_IMPL::DomainInitializer< name > name ## _initializer_; | ||
| 217 | + | ||
| 218 | + #endif // REACT_DOMAIN_H_INCLUDED | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments