26 #if !defined(RXCPP_OPERATORS_RX_PUBLISH_HPP) 27 #define RXCPP_OPERATORS_RX_PUBLISH_HPP 29 #include "../rx-includes.hpp" 39 struct publish_invalid_arguments {};
42 struct publish_invalid :
public rxo::operator_base<publish_invalid_arguments<AN...>> {
43 using type = observable<publish_invalid_arguments<
AN...>, publish_invalid<
AN...>>;
46 using publish_invalid_t =
typename publish_invalid<
AN...>::type;
74 return operator_factory<publish_synchronized_tag,
AN...>(std::make_tuple(std::forward<AN>(an)...));
82 template<
class Observable,
87 class Multicast = rxo::detail::multicast<SourceValue, rxu::decay_t<Observable>, Subject>,
90 static Result
member(Observable&& o) {
94 template<
class Observable,
96 is_observable<Observable>>,
99 class Multicast = rxo::detail::multicast<SourceValue, rxu::decay_t<Observable>, Subject>,
103 return Result(Multicast(std::forward<Observable>(o), Subject(cs)));
106 template<
class Observable,
class T,
108 is_observable<Observable>>,
111 class Multicast = rxo::detail::multicast<SourceValue, rxu::decay_t<Observable>, Subject>,
115 return Result(Multicast(std::forward<Observable>(o), Subject(first, cs)));
118 template<
class...
AN>
119 static operators::detail::publish_invalid_t<
AN...>
member(
AN...) {
122 static_assert(
sizeof...(
AN) == 10000,
"publish takes (optional CompositeSubscription) or (T, optional CompositeSubscription)");
129 template<
class Observable,
class Coordination,
131 is_observable<Observable>,
135 class Multicast = rxo::detail::multicast<SourceValue, rxu::decay_t<Observable>, Subject>,
139 return Result(Multicast(std::forward<Observable>(o), Subject(std::forward<Coordination>(cn), cs)));
142 template<
class...
AN>
143 static operators::detail::publish_invalid_t<
AN...>
member(
AN...) {
146 static_assert(
sizeof...(
AN) == 10000,
"publish_synchronized takes (Coordination, optional CompositeSubscription)");
auto publish_synchronized(AN &&...an) -> operator_factory< publish_synchronized_tag, AN... >
Turn a cold observable hot and allow connections to the source to be independent of subscriptions...
Definition: rx-publish.hpp:72
Definition: rx-behavior.hpp:70
a source of values that is shared across all subscribers and does not start until connectable_observa...
Definition: rx-connectable_observable.hpp:105
Definition: rx-all.hpp:26
typename std::decay< T >::type::value_type value_type_t
Definition: rx-util.hpp:35
Definition: rx-operators.hpp:323
controls lifetime for scheduler::schedule and observable<T, SourceOperator>::subscribe.
Definition: rx-subscription.hpp:364
Definition: rx-subject.hpp:237
Definition: rx-operators.hpp:69
static operators::detail::publish_invalid_t< AN... > member(AN...)
Definition: rx-publish.hpp:119
static operators::detail::publish_invalid_t< AN... > member(AN...)
Definition: rx-publish.hpp:143
static Result member(Observable &&o)
Definition: rx-publish.hpp:90
auto AN
Definition: rx-finally.hpp:105
Definition: rx-operators.hpp:47
static Result member(Observable &&o, Coordination &&cn, composite_subscription cs=composite_subscription())
Definition: rx-publish.hpp:138
auto publish(AN &&...an) -> operator_factory< publish_tag, AN... >
Turn a cold observable hot and allow connections to the source to be independent of subscriptions...
Definition: rx-publish.hpp:53
typename std::enable_if< all_true_type< BN... >::value >::type enable_if_all_true_type_t
Definition: rx-util.hpp:114
auto first() -> operator_factory< first_tag >
For each item from this observable reduce it by sending only the first item.
Definition: rx-reduce.hpp:378
static Result member(Observable &&o, composite_subscription cs)
Definition: rx-publish.hpp:102
Definition: rx-operators.hpp:317
Definition: rx-synchronize.hpp:164
static Result member(Observable &&o, T first, composite_subscription cs=composite_subscription())
Definition: rx-publish.hpp:114
allows connections to the source to be independent of subscriptions.
Definition: rx-predef.hpp:177
Definition: rx-coordination.hpp:37