// Copyright (c) Facebook, Inc. and its affiliates. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. #pragma once #include #include #include #include #include #include #include "yarpl/flowable/Flowable.h" namespace yarpl { namespace flowable { template <> class Flowable { public: /** * Emit the sequence of numbers [start, start + count). */ static std::shared_ptr> range(int64_t start, int64_t count); template static std::shared_ptr> just(T&& value) { return Flowable>::just(std::forward(value)); } template static std::shared_ptr> justN(std::initializer_list list) { return Flowable>::justN(std::move(list)); } // this will generate a flowable which can be subscribed to only once template static std::shared_ptr> justOnce(T&& value) { return Flowable>::justOnce(std::forward(value)); } template static std::shared_ptr> concat( std::shared_ptr> first, Args... args) { return first->concatWith(args...); } private: Flowable() = delete; }; } // namespace flowable } // namespace yarpl