From 49a0877b8c4e9776a906348658a0b4162427622e Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Tue, 26 Dec 2023 22:56:36 +0000 Subject: [PATCH] docs: exclude test entites from bindings utils --- .../include/opencv2/core/bindings_utils.hpp | 71 ++++++++++--------- 1 file changed, 38 insertions(+), 33 deletions(-) diff --git a/modules/core/include/opencv2/core/bindings_utils.hpp b/modules/core/include/opencv2/core/bindings_utils.hpp index 64f346570a..9c8f9e0f2b 100644 --- a/modules/core/include/opencv2/core/bindings_utils.hpp +++ b/modules/core/include/opencv2/core/bindings_utils.hpp @@ -75,20 +75,6 @@ String dumpString(const String& argument) return cv::format("String: %s", argument.c_str()); } -CV_WRAP static inline -String testOverloadResolution(int value, const Point& point = Point(42, 24)) -{ - return format("overload (int=%d, point=(x=%d, y=%d))", value, point.x, - point.y); -} - -CV_WRAP static inline -String testOverloadResolution(const Rect& rect) -{ - return format("overload (rect=(x=%d, y=%d, w=%d, h=%d))", rect.x, rect.y, - rect.width, rect.height); -} - CV_WRAP static inline String dumpRect(const Rect& argument) { @@ -111,6 +97,42 @@ String dumpRotatedRect(const RotatedRect& argument) argument.size.height, argument.angle); } +CV_WRAP static inline +String dumpRange(const Range& argument) +{ + if (argument == Range::all()) + { + return "range: all"; + } + else + { + return format("range: (s=%d, e=%d)", argument.start, argument.end); + } +} + +CV_EXPORTS_W String dumpVectorOfInt(const std::vector& vec); + +CV_EXPORTS_W String dumpVectorOfDouble(const std::vector& vec); + +CV_EXPORTS_W String dumpVectorOfRect(const std::vector& vec); + + +//! @cond IGNORED + +CV_WRAP static inline +String testOverloadResolution(int value, const Point& point = Point(42, 24)) +{ + return format("overload (int=%d, point=(x=%d, y=%d))", value, point.x, + point.y); +} + +CV_WRAP static inline +String testOverloadResolution(const Rect& rect) +{ + return format("overload (rect=(x=%d, y=%d, w=%d, h=%d))", rect.x, rect.y, + rect.width, rect.height); +} + CV_WRAP static inline RotatedRect testRotatedRect(float x, float y, float w, float h, float angle) { @@ -126,19 +148,6 @@ std::vector testRotatedRectVector(float x, float y, float w, float return result; } -CV_WRAP static inline -String dumpRange(const Range& argument) -{ - if (argument == Range::all()) - { - return "range: all"; - } - else - { - return format("range: (s=%d, e=%d)", argument.start, argument.end); - } -} - CV_WRAP static inline int testOverwriteNativeMethod(int argument) { @@ -151,12 +160,6 @@ String testReservedKeywordConversion(int positional_argument, int lambda = 2, in return format("arg=%d, lambda=%d, from=%d", positional_argument, lambda, from); } -CV_EXPORTS_W String dumpVectorOfInt(const std::vector& vec); - -CV_EXPORTS_W String dumpVectorOfDouble(const std::vector& vec); - -CV_EXPORTS_W String dumpVectorOfRect(const std::vector& vec); - CV_WRAP static inline void generateVectorOfRect(size_t len, CV_OUT std::vector& vec) { @@ -323,6 +326,8 @@ private: typedef OriginalClassName::Params OriginalClassName_Params; } // namespace nested +//! @endcond IGNORED + namespace fs { CV_EXPORTS_W cv::String getCacheDirectoryForDownloads(); } // namespace fs