mirror of https://github.com/opencv/opencv.git
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>pull/18539/head
parent
46ccde82cf
commit
af2f8c69f0
10 changed files with 179 additions and 19 deletions
@ -0,0 +1,36 @@ |
||||
// 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
|
Loading…
Reference in new issue