#ifndef MEDIAPIPE_FRAMEWORK_API2_CONTRACT_H_
#define MEDIAPIPE_FRAMEWORK_API2_CONTRACT_H_
#include <tuple>
#include <type_traits>
#include <utility>
#include <vector>
#include "mediapipe/framework/api2/const_str.h"
#include "mediapipe/framework/api2/packet.h"
#include "mediapipe/framework/api2/port.h"
#include "mediapipe/framework/api2/tag.h"
#include "mediapipe/framework/api2/tuple.h"
#include "mediapipe/framework/calculator_context.h"
#include "mediapipe/framework/calculator_contract.h"
#include "mediapipe/framework/output_side_packet.h"
#include "mediapipe/framework/port/logging.h"
namespace mediapipe {
namespace api2 {
class StreamHandler { … };
class TimestampChange { … };
namespace internal {
template <class Base>
struct IsSubclass { … };
template <class T, class = void>
struct HasProcessMethod : std::false_type { … };
template <class T>
struct HasProcessMethod<
T,
std::void_t<decltype(absl::Status(std::declval<std::decay_t<T>>().Process(
std::declval<mediapipe::CalculatorContext*>())))>> : std::true_type {};
template <class T, class = void>
struct HasNestedItems : std::false_type { … };
template <class T>
struct HasNestedItems<
T, std::void_t<decltype(std::declval<std::decay_t<T>>().nested_items())>>
: std::true_type {};
template <class TupleRef>
struct TagTuple { … };
template <class TupleRef>
struct TaggedAccess { … };
template <class... T>
constexpr auto ExtractNestedItems(std::tuple<T...> tuple) { … }
template <typename... T>
class Contract { … };
template <typename... T>
constexpr auto MakeContract(T&&... args) { … }
template <typename... T>
constexpr auto MakeContract(const std::tuple<T...>& tuple) { … }
template <typename C2T, const C2T& c2>
class TaggedContract { … };
template <class T>
struct IsInputPort
: std::bool_constant<std::is_base_of<InputBase, std::decay_t<T>>{ … };
template <class T>
struct IsOutputPort
: std::bool_constant<std::is_base_of<OutputBase, std::decay_t<T>>{ … };
template <class P>
class PortArg { … };
template <class P>
auto MakePortArg(CalculatorContext* cc, const P& port) { … }
template <class... P>
class OutputSender { … };
template <class... P>
auto MakeOutputSender(P&&... args) { … }
template <class... P>
auto MakeOutputSender(std::tuple<P...>&& args) { … }
template <class F, class... P>
class FunCaller { … };
template <class... T>
absl::Status ProcessFnCallers(CalculatorContext* cc, std::tuple<T...> callers);
inline absl::Status ProcessFnCallers(CalculatorContext* cc, std::tuple<>) { … }
template <class T>
absl::Status ProcessFnCallers(CalculatorContext* cc, std::tuple<T> callers) { … }
}
template <class F, class... P>
constexpr auto ProcessFn(F&& f, P&&... args) { … }
}
}
#endif