1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 15:53:03 +04:00

Merge pull request #23555 from LaurentBerger:doc_format

don't ignore documentation for cv::format in doxygen #23555 

Issue https://github.com/opencv/opencv/issues/23553

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [x] I agree to contribute to the project under Apache 2 License.
- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [x] The PR is proposed to the proper branch
- [x] There is a reference to the original bug report and related work issue
- [x] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [x] The feature is well documented and sample code can be built with the project CMake
This commit is contained in:
Laurent Berger
2023-04-28 14:24:07 +02:00
committed by GitHub
parent 9161e40aa0
commit 23b819efb8
@@ -61,10 +61,10 @@
# define CV_FORMAT_PRINTF(A, B)
#endif
//! @cond IGNORED
namespace cv
{
//! @cond IGNORED
////////////////////////////// Matx methods depending on core API /////////////////////////////
@@ -424,26 +424,6 @@ template<typename _Tp> static inline _Tp randu()
return (_Tp)theRNG();
}
///////////////////////////////// Formatted string generation /////////////////////////////////
/** @brief Returns a text string formatted using the printf-like expression.
The function acts like sprintf but forms and returns an STL string. It can be used to form an error
message in the Exception constructor.
@param fmt printf-compatible formatting specifiers.
**Note**:
|Type|Specifier|
|-|-|
|`const char*`|`%s`|
|`char`|`%c`|
|`float` / `double`|`%f`,`%g`|
|`int`, `long`, `long long`|`%d`, `%ld`, ``%lld`|
|`unsigned`, `unsigned long`, `unsigned long long`|`%u`, `%lu`, `%llu`|
|`uint64` -> `uintmax_t`, `int64` -> `intmax_t`|`%ju`, `%jd`|
|`size_t`|`%zu`|
*/
CV_EXPORTS String format( const char* fmt, ... ) CV_FORMAT_PRINTF(1, 2);
///////////////////////////////// Formatted output of cv::Mat /////////////////////////////////
@@ -496,6 +476,28 @@ int print(const Matx<_Tp, m, n>& matx, FILE* stream = stdout)
//! @endcond
///////////////////////////////// Formatted string generation /////////////////////////////////
/** @brief Returns a text string formatted using the printf-like expression.
The function acts like sprintf but forms and returns an STL string. It can be used to form an error
message in the Exception constructor.
@param fmt printf-compatible formatting specifiers.
**Note**:
|Type|Specifier|
|-|-|
|`const char*`|`%s`|
|`char`|`%c`|
|`float` / `double`|`%f`,`%g`|
|`int`, `long`, `long long`|`%d`, `%ld`, ``%lld`|
|`unsigned`, `unsigned long`, `unsigned long long`|`%u`, `%lu`, `%llu`|
|`uint64` -> `uintmax_t`, `int64` -> `intmax_t`|`%ju`, `%jd`|
|`size_t`|`%zu`|
@ingroup core_utils
*/
CV_EXPORTS String format(const char* fmt, ...) CV_FORMAT_PRINTF(1, 2);
/****************************************************************************************\
* Auxiliary algorithms *
\****************************************************************************************/