forwards.h 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. #pragma once
  2. /*
  3. * Copyright 2018-present Facebook, Inc.
  4. *
  5. * Licensed under the Apache License, Version 2.0 (the "License");
  6. * you may not use this file except in compliance with the License.
  7. * You may obtain a copy of the License at
  8. *
  9. * http://www.apache.org/licenses/LICENSE-2.0
  10. *
  11. * Unless required by applicable law or agreed to in writing, software
  12. * distributed under the License is distributed on an "AS IS" BASIS,
  13. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. * See the License for the specific language governing permissions and
  15. * limitations under the License.
  16. */
  17. #include <folly/experimental/pushmi/traits.h>
  18. #include <chrono>
  19. #include <exception>
  20. namespace pushmi {
  21. // property_set
  22. template <class T, class = void>
  23. struct property_traits;
  24. template <class T, class = void>
  25. struct property_set_traits;
  26. template <class... PropertyN>
  27. struct property_set;
  28. // trait & tag types
  29. template <class... TN>
  30. struct is_single;
  31. template <class... TN>
  32. struct is_many;
  33. template <class... TN>
  34. struct is_flow;
  35. template <class... TN>
  36. struct is_receiver;
  37. template <class... TN>
  38. struct is_sender;
  39. template <class... TN>
  40. struct is_executor;
  41. template <class... TN>
  42. struct is_time;
  43. template <class... TN>
  44. struct is_constrained;
  45. template <class... TN>
  46. struct is_always_blocking;
  47. template <class... TN>
  48. struct is_never_blocking;
  49. template <class... TN>
  50. struct is_maybe_blocking;
  51. template <class... TN>
  52. struct is_fifo_sequence;
  53. template <class... TN>
  54. struct is_concurrent_sequence;
  55. // implementation types
  56. template <PUSHMI_TYPE_CONSTRAINT(SemiMovable)... TN>
  57. class receiver;
  58. template <PUSHMI_TYPE_CONSTRAINT(SemiMovable)... TN>
  59. class flow_receiver;
  60. template <PUSHMI_TYPE_CONSTRAINT(SemiMovable)... TN>
  61. class single_sender;
  62. template <PUSHMI_TYPE_CONSTRAINT(SemiMovable)... TN>
  63. class many_sender;
  64. template <PUSHMI_TYPE_CONSTRAINT(SemiMovable)... TN>
  65. class constrained_single_sender;
  66. template <PUSHMI_TYPE_CONSTRAINT(SemiMovable)... TN>
  67. class time_single_sender;
  68. template <PUSHMI_TYPE_CONSTRAINT(SemiMovable)... TN>
  69. class flow_single_sender;
  70. template <PUSHMI_TYPE_CONSTRAINT(SemiMovable)... TN>
  71. class flow_many_sender;
  72. template <class E = std::exception_ptr, class... VN>
  73. class any_receiver;
  74. template <
  75. class PE = std::exception_ptr,
  76. class PV = std::ptrdiff_t,
  77. class E = PE,
  78. class... VN>
  79. class any_flow_receiver;
  80. template <class E = std::exception_ptr, class... VN>
  81. class any_single_sender;
  82. template <class E = std::exception_ptr, class... VN>
  83. class any_many_sender;
  84. template <class PE = std::exception_ptr, class E = PE, class... VN>
  85. class any_flow_single_sender;
  86. template <
  87. class PE = std::exception_ptr,
  88. class PV = std::ptrdiff_t,
  89. class E = PE,
  90. class... VN>
  91. class any_flow_many_sender;
  92. template <class E = std::exception_ptr, class C = std::ptrdiff_t, class... VN>
  93. class any_constrained_single_sender;
  94. template <
  95. class E = std::exception_ptr,
  96. class TP = std::chrono::system_clock::time_point,
  97. class... VN>
  98. class any_time_single_sender;
  99. template <class E = std::exception_ptr>
  100. struct any_executor;
  101. template <class E = std::exception_ptr>
  102. struct any_executor_ref;
  103. template <class E = std::exception_ptr, class CV = std::ptrdiff_t>
  104. struct any_constrained_executor;
  105. template <class E = std::exception_ptr, class TP = std::ptrdiff_t>
  106. struct any_constrained_executor_ref;
  107. template <
  108. class E = std::exception_ptr,
  109. class TP = std::chrono::system_clock::time_point>
  110. struct any_time_executor;
  111. template <
  112. class E = std::exception_ptr,
  113. class TP = std::chrono::system_clock::time_point>
  114. struct any_time_executor_ref;
  115. namespace operators {}
  116. namespace extension_operators {}
  117. namespace aliases {
  118. namespace v = ::pushmi;
  119. namespace mi = ::pushmi;
  120. namespace op = ::pushmi::operators;
  121. namespace ep = ::pushmi::extension_operators;
  122. } // namespace aliases
  123. namespace detail {
  124. struct any {
  125. template <class T>
  126. constexpr any(T&&) noexcept {}
  127. };
  128. } // namespace detail
  129. } // namespace pushmi