opencv/modules/gapi/include/opencv2/gapi/s11n/base.hpp
Anastasiya(Asya) Pronina af2f8c69f0
Merge pull request #18496 from AsyaPronina:comp_args_serialization
Serialization && deserialization for compile arguments

* Initial stub

* Add test on serialization of a custom type

* Namespaces rework

* Fix isSupported in test struct

* Fix clang lookup issue

* Initial implementation

* Drop the isSupported flag

* Initial implementation

* Removed internal header inclusion

* Switched to public API

* Implemented serialization

* Adding desirialize: WIP

* Fixed merge errors

* Implemented

* Final polishing

* Addressed review comments and added debug throw

* Added FluidROI test

* Polishing

* Polishing

* Polishing

* Polishing

* Polishing

* Updated CMakeLists.txt

* Fixed comments

* Addressed review comments

* Removed decay from deserialize_arg

* Addressed review comments

* Removed extra inclusion

* Fixed Win64 warning

* Update gcommon.hpp

* Update serialization.cpp

* Update gcommon.hpp

* gapi: drop GAPI_EXPORTS_W_SIMPLE from GCompileArg

Co-authored-by: Smirnov Alexey <alexey.smirnov@intel.com>
Co-authored-by: AsyaPronina <155jj@mail.ru>
2020-10-07 21:48:49 +00:00

37 lines
993 B
C++

// 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_BASE_HPP
#define OPENCV_GAPI_S11N_BASE_HPP
#include <opencv2/gapi/own/assert.hpp>
namespace cv {
namespace gapi {
namespace s11n {
struct IOStream;
struct IIStream;
namespace detail {
// Will be used along with default types if possible in specific cases (compile args, etc)
// Note: actual implementation is defined by user
template<typename T>
struct S11N {
static void serialize(IOStream &, const T &) {
GAPI_Assert(false && "No serialization routine is provided!");
}
static T deserialize(IIStream &) {
GAPI_Assert(false && "No deserialization routine is provided!");
}
};
} // namespace detail
} // namespace s11n
} // namespace gapi
} // namespace cv
#endif // OPENCV_GAPI_S11N_BASE_HPP