// This file is part of OpenCV project. // It is subject to the license terms in the LICENSE file found in the top-level directory // of this distribution and at http://opencv.org/license.html. // // Copyright (C) 2020 Intel Corporation #ifndef OPENCV_GAPI_S11N_HPP #define OPENCV_GAPI_S11N_HPP #include #include namespace cv { namespace gapi { namespace detail { GAPI_EXPORTS cv::GComputation getGraph(const std::vector &p); } // namespace detail namespace detail { GAPI_EXPORTS cv::GMetaArgs getMetaArgs(const std::vector &p); } // namespace detail namespace detail { GAPI_EXPORTS cv::GRunArgs getRunArgs(const std::vector &p); } // namespace detail GAPI_EXPORTS std::vector serialize(const cv::GComputation &c); //namespace{ template static inline T deserialize(const std::vector &p); //} //ananymous namespace GAPI_EXPORTS std::vector serialize(const cv::GMetaArgs&); GAPI_EXPORTS std::vector serialize(const cv::GRunArgs&); template<> inline cv::GComputation deserialize(const std::vector &p) { return detail::getGraph(p); } template<> inline cv::GMetaArgs deserialize(const std::vector &p) { return detail::getMetaArgs(p); } template<> inline cv::GRunArgs deserialize(const std::vector &p) { return detail::getRunArgs(p); } } // namespace gapi } // namespace cv #endif // OPENCV_GAPI_S11N_HPP