mirror of
https://github.com/Naios/continuable.git
synced 2025-12-08 01:36:46 +08:00
Remove the continuable-api header
This commit is contained in:
parent
9ce9884376
commit
17a4e8a8da
@ -1,83 +0,0 @@
|
||||
|
||||
/*
|
||||
|
||||
/~` _ _ _|_. _ _ |_ | _
|
||||
\_,(_)| | | || ||_|(_||_)|(/_
|
||||
|
||||
https://github.com/Naios/continuable
|
||||
v2.0.0
|
||||
|
||||
Copyright(c) 2015 - 2018 Denis Blank <denis.blank at outlook dot com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files(the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and / or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions :
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef CONTINUABLE_DETAIL_API_HPP_INCLUDED
|
||||
#define CONTINUABLE_DETAIL_API_HPP_INCLUDED
|
||||
|
||||
/// Declares the continuable library namespace.
|
||||
///
|
||||
/// The most important class is cti::continuable_base, that provides the
|
||||
/// whole functionality for continuation chaining.
|
||||
///
|
||||
/// The class cti::continuable_base is created through the
|
||||
/// cti::make_continuable() function which accepts a callback taking function.
|
||||
///
|
||||
/// Also there are following support functions available:
|
||||
/// - cti::when_all() - connects cti::continuable_base's to an `all` connection.
|
||||
/// - cti::when_any() - connects cti::continuable_base's to an `any` connection.
|
||||
/// - cti::when_seq() - connects cti::continuable_base's to a sequence.
|
||||
///
|
||||
namespace cti {
|
||||
/// The main class of the continuable library, it provides the functionality
|
||||
/// for chaining callbacks and continuations together to a unified hierarchy.
|
||||
///
|
||||
/// The most important method is the cti::continuable_base::then() method,
|
||||
/// which allows to attach a callback to the continuable.
|
||||
///
|
||||
/// Use the continuable types defined in `continuable/continuable.hpp`,
|
||||
/// in order to use this class.
|
||||
///
|
||||
/// \tparam Data The internal data which is used to store the current
|
||||
/// continuation and intermediate lazy connection result.
|
||||
///
|
||||
/// \tparam Annotation The internal data used to store the current signature
|
||||
/// hint or strategy used for combining lazy connections.
|
||||
///
|
||||
/// \note Nearly all methods of the cti::continuable_base are required to be
|
||||
/// called as r-value. This is required because the continuable carries
|
||||
/// variables which are consumed when the object is transformed as part
|
||||
/// of a method call. You may copy a continuable which underlying
|
||||
/// storages are copyable to split the call hierarchy into multiple parts.
|
||||
///
|
||||
/// \attention The continuable_base objects aren't intended to be stored.
|
||||
/// If you want to store a continuble_base you should always
|
||||
/// call the continuable_base::freeze method for disabling the
|
||||
/// invocation on destruction.
|
||||
///
|
||||
/// \since version 1.0.0
|
||||
template <typename Data, typename Annotation>
|
||||
class continuable_base;
|
||||
|
||||
/// Declares the internal private namespace of the continuable library
|
||||
/// which isn't intended to be used by users of the library.
|
||||
namespace detail {}
|
||||
} // namespace cti
|
||||
|
||||
#endif // CONTINUABLE_DETAIL_API_HPP_INCLUDED
|
||||
@ -36,7 +36,6 @@
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
|
||||
#include <continuable/continuable-api.hpp>
|
||||
#include <continuable/detail/awaiting.hpp>
|
||||
#include <continuable/detail/base.hpp>
|
||||
#include <continuable/detail/composition.hpp>
|
||||
@ -45,6 +44,33 @@
|
||||
#include <continuable/detail/util.hpp>
|
||||
|
||||
namespace cti {
|
||||
/// The main class of the continuable library, it provides the functionality
|
||||
/// for chaining callbacks and continuations together to a unified hierarchy.
|
||||
///
|
||||
/// The most important method is the cti::continuable_base::then() method,
|
||||
/// which allows to attach a callback to the continuable.
|
||||
///
|
||||
/// Use the continuable types defined in `continuable/continuable.hpp`,
|
||||
/// in order to use this class.
|
||||
///
|
||||
/// \tparam Data The internal data which is used to store the current
|
||||
/// continuation and intermediate lazy connection result.
|
||||
///
|
||||
/// \tparam Annotation The internal data used to store the current signature
|
||||
/// hint or strategy used for combining lazy connections.
|
||||
///
|
||||
/// \note Nearly all methods of the cti::continuable_base are required to be
|
||||
/// called as r-value. This is required because the continuable carries
|
||||
/// variables which are consumed when the object is transformed as part
|
||||
/// of a method call. You may copy a continuable which underlying
|
||||
/// storages are copyable to split the call hierarchy into multiple parts.
|
||||
///
|
||||
/// \attention The continuable_base objects aren't intended to be stored.
|
||||
/// If you want to store a continuble_base you should always
|
||||
/// call the continuable_base::freeze method for disabling the
|
||||
/// invocation on destruction.
|
||||
///
|
||||
/// \since version 1.0.0
|
||||
template <typename Data, typename Annotation>
|
||||
class continuable_base {
|
||||
|
||||
|
||||
@ -34,7 +34,6 @@
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
|
||||
#include <continuable/continuable-api.hpp>
|
||||
#include <continuable/detail/hints.hpp>
|
||||
#include <continuable/detail/types.hpp>
|
||||
#include <continuable/detail/util.hpp>
|
||||
|
||||
@ -31,7 +31,6 @@
|
||||
#ifndef CONTINUABLE_TESTING_HPP_INCLUDED
|
||||
#define CONTINUABLE_TESTING_HPP_INCLUDED
|
||||
|
||||
#include <continuable/continuable-api.hpp>
|
||||
#include <continuable/detail/testing.hpp>
|
||||
#include <continuable/detail/traits.hpp>
|
||||
|
||||
|
||||
@ -33,7 +33,6 @@
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
#include <continuable/continuable-api.hpp>
|
||||
#include <continuable/continuable-base.hpp>
|
||||
#include <continuable/continuable-promise-base.hpp>
|
||||
#include <continuable/detail/hints.hpp>
|
||||
|
||||
@ -31,7 +31,6 @@
|
||||
#ifndef CONTINUABLE_TRANSFORMS_HPP_INCLUDED
|
||||
#define CONTINUABLE_TRANSFORMS_HPP_INCLUDED
|
||||
|
||||
#include <continuable/continuable-api.hpp>
|
||||
#include <continuable/detail/transforms.hpp>
|
||||
|
||||
namespace cti {
|
||||
|
||||
@ -35,7 +35,6 @@
|
||||
|
||||
#include <function2/function2.hpp>
|
||||
|
||||
#include <continuable/continuable-api.hpp>
|
||||
#include <continuable/continuable-trait.hpp>
|
||||
|
||||
namespace cti {
|
||||
|
||||
@ -31,7 +31,20 @@
|
||||
#ifndef CONTINUABLE_HPP_INCLUDED
|
||||
#define CONTINUABLE_HPP_INCLUDED
|
||||
|
||||
#include <continuable/continuable-api.hpp>
|
||||
/// Declares the continuable library namespace.
|
||||
///
|
||||
/// The most important class is cti::continuable_base, that provides the
|
||||
/// whole functionality for continuation chaining.
|
||||
///
|
||||
/// The class cti::continuable_base is created through the
|
||||
/// cti::make_continuable() function which accepts a callback taking function.
|
||||
///
|
||||
/// Also there are following support functions available:
|
||||
/// - cti::when_all() - connects cti::continuable_base's to an `all` connection.
|
||||
/// - cti::when_any() - connects cti::continuable_base's to an `any` connection.
|
||||
/// - cti::when_seq() - connects cti::continuable_base's to a sequence.
|
||||
namespace cti {}
|
||||
|
||||
#include <continuable/continuable-base.hpp>
|
||||
#include <continuable/continuable-promise-base.hpp>
|
||||
#include <continuable/continuable-trait.hpp>
|
||||
|
||||
@ -37,7 +37,6 @@
|
||||
#include <cassert>
|
||||
#include <experimental/coroutine>
|
||||
|
||||
#include <continuable/continuable-api.hpp>
|
||||
#include <continuable/detail/base.hpp>
|
||||
#include <continuable/detail/expected.hpp>
|
||||
#include <continuable/detail/features.hpp>
|
||||
|
||||
@ -35,7 +35,6 @@
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
|
||||
#include <continuable/continuable-api.hpp>
|
||||
#include <continuable/detail/features.hpp>
|
||||
#include <continuable/detail/hints.hpp>
|
||||
#include <continuable/detail/traits.hpp>
|
||||
|
||||
@ -38,7 +38,6 @@
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
|
||||
#include <continuable/continuable-api.hpp>
|
||||
#include <continuable/continuable-promise-base.hpp>
|
||||
#include <continuable/detail/base.hpp>
|
||||
#include <continuable/detail/hints.hpp>
|
||||
@ -357,8 +356,8 @@ auto finalize_composition(
|
||||
// std::pair<size_constant<?>, size_constant<?>>
|
||||
// ~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~
|
||||
// Continuation pos Result pos
|
||||
constexpr auto const begin = std::make_pair(traits::size_constant_of<0>(),
|
||||
traits::size_constant_of<0>());
|
||||
constexpr auto const begin = std::make_pair(
|
||||
traits::size_constant_of<0>(), traits::size_constant_of<0>());
|
||||
constexpr auto const pack = traits::identify<decltype(composition)>{};
|
||||
constexpr auto const end = traits::pack_size_of(pack);
|
||||
auto const condition = [=](auto pos) { return pos.first < end; };
|
||||
|
||||
@ -36,7 +36,6 @@
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
|
||||
#include <continuable/continuable-api.hpp>
|
||||
#include <continuable/detail/hints.hpp>
|
||||
#include <continuable/detail/traits.hpp>
|
||||
#include <continuable/detail/types.hpp>
|
||||
|
||||
@ -33,9 +33,8 @@
|
||||
|
||||
#include <type_traits>
|
||||
|
||||
#include <continuable/continuable-api.hpp>
|
||||
#include <continuable/detail/traits.hpp>
|
||||
#include <continuable/detail/util.hpp>
|
||||
#include <continuable/detail/types.hpp>
|
||||
|
||||
namespace cti {
|
||||
namespace detail {
|
||||
|
||||
@ -36,7 +36,6 @@
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include <continuable/continuable-api.hpp>
|
||||
#include <continuable/detail/traits.hpp>
|
||||
#include <continuable/detail/types.hpp>
|
||||
#include <continuable/detail/util.hpp>
|
||||
|
||||
@ -37,7 +37,6 @@
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
|
||||
#include <continuable/continuable-api.hpp>
|
||||
#include <continuable/detail/features.hpp>
|
||||
|
||||
namespace cti {
|
||||
|
||||
@ -33,7 +33,6 @@
|
||||
|
||||
#include <future>
|
||||
|
||||
#include <continuable/continuable-api.hpp>
|
||||
#include <continuable/detail/base.hpp>
|
||||
#include <continuable/detail/features.hpp>
|
||||
#include <continuable/detail/hints.hpp>
|
||||
|
||||
@ -31,7 +31,6 @@
|
||||
#ifndef CONTINUABLE_DETAIL_TYPES_HPP_INCLUDED
|
||||
#define CONTINUABLE_DETAIL_TYPES_HPP_INCLUDED
|
||||
|
||||
#include <continuable/continuable-api.hpp>
|
||||
#include <continuable/detail/features.hpp>
|
||||
|
||||
#ifndef CONTINUABLE_WITH_CUSTOM_ERROR_TYPE
|
||||
@ -43,6 +42,9 @@
|
||||
#endif // CONTINUABLE_WITH_CUSTOM_ERROR_TYPE
|
||||
|
||||
namespace cti {
|
||||
template <typename Data, typename Annotation>
|
||||
class continuable_base;
|
||||
|
||||
namespace detail {
|
||||
/// Contains types used globally across the library
|
||||
namespace types {
|
||||
|
||||
@ -36,7 +36,6 @@
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
|
||||
#include <continuable/continuable-api.hpp>
|
||||
#include <continuable/detail/features.hpp>
|
||||
#include <continuable/detail/traits.hpp>
|
||||
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
set(LIB_SOURCES
|
||||
${CMAKE_SOURCE_DIR}/include/continuable/continuable-api.hpp
|
||||
${CMAKE_SOURCE_DIR}/include/continuable/continuable.hpp
|
||||
${CMAKE_SOURCE_DIR}/include/continuable/continuable-types.hpp
|
||||
${CMAKE_SOURCE_DIR}/include/continuable/continuable-base.hpp
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user