#ifndef ORC_RT_WRAPPER_FUNCTION_UTILS_H
#define ORC_RT_WRAPPER_FUNCTION_UTILS_H
#include "error.h"
#include "executor_address.h"
#include "orc_rt/c_api.h"
#include "simple_packed_serialization.h"
#include <type_traits>
namespace orc_rt {
class WrapperFunctionResult { … };
namespace detail {
template <typename RetT> class WrapperFunctionHandlerCaller { … };
template <> class WrapperFunctionHandlerCaller<void> { … };
template <typename WrapperFunctionImplT,
template <typename> class ResultSerializer, typename... SPSTagTs>
class WrapperFunctionHandlerHelper
: public WrapperFunctionHandlerHelper<
decltype(&std::remove_reference_t<WrapperFunctionImplT>::operator()),
ResultSerializer, SPSTagTs...> { … };
WrapperFunctionHandlerHelper<RetT (ArgTs...), ResultSerializer, SPSTagTs...>;
WrapperFunctionHandlerHelper<RetT (*)(ArgTs...), ResultSerializer, SPSTagTs...>;
WrapperFunctionHandlerHelper<RetT (ClassT::*)(ArgTs...), ResultSerializer, SPSTagTs...>;
WrapperFunctionHandlerHelper<RetT (ClassT::*)(ArgTs...) const, ResultSerializer, SPSTagTs...>;
template <typename SPSRetTagT, typename RetT> class ResultSerializer { … };
ResultSerializer<SPSRetTagT, Error>;
ResultSerializer<SPSRetTagT, Expected<T>>;
template <typename SPSRetTagT, typename RetT> class ResultDeserializer { … };
template <> class ResultDeserializer<SPSError, Error> { … };
ResultDeserializer<SPSExpected<SPSTagT>, Expected<T>>;
}
template <typename SPSSignature> class WrapperFunction;
WrapperFunction<SPSRetTagT (SPSTagTs...)>;
WrapperFunction<void (SPSTagTs...)>;
template <typename RetT, typename ClassT, typename... ArgTs>
class MethodWrapperHandler { … };
template <typename RetT, typename ClassT, typename... ArgTs>
MethodWrapperHandler<RetT, ClassT, ArgTs...>
makeMethodWrapperHandler(RetT (ClassT::*Method)(ArgTs...)) { … }
class WrapperFunctionCall { … };
SPSWrapperFunctionCall;
template <>
class SPSSerializationTraits<SPSWrapperFunctionCall, WrapperFunctionCall> { … };
}
#endif