mdbx-docs: fix/refine C++ API docs by Doxygen.

This commit is contained in:
Леонид Юрьев (Leonid Yuriev)
2022-04-23 17:50:28 +03:00
parent c9a214f038
commit 9c569b41ed
3 changed files with 47 additions and 18 deletions

View File

@@ -256,11 +256,13 @@
#endif /* _MSC_VER (warnings) */
//------------------------------------------------------------------------------
/// \brief The libmdbx C++ API namespace
/// \ingroup cxx_api
namespace mdbx {
/// \defgroup cxx_api C++ API
/// @{
namespace mdbx {
// Functions whose signature depends on the `mdbx::byte` type
// must be strictly defined as inline!
#if defined(DOXYGEN) || (defined(__cpp_char8_t) && __cpp_char8_t >= 201811)
@@ -352,6 +354,9 @@ using path = ::std::wstring;
using path = ::std::string;
#endif /* mdbx::path */
/// \defgroup cxx_exceptions exceptions and errors
/// @{
/// \brief Transfers C++ exceptions thru C callbacks.
/// \details Implements saving exceptions before returning
/// from an C++'s environment to the intermediate C code and re-throwing after
@@ -507,11 +512,17 @@ static MDBX_CXX14_CONSTEXPR size_t check_length(size_t headroom,
size_t payload);
static MDBX_CXX14_CONSTEXPR size_t check_length(size_t headroom, size_t payload,
size_t tailroom);
/// end of cxx_exceptions @}
static MDBX_CXX17_CONSTEXPR size_t strlen(const char *c_str) noexcept;
static MDBX_CXX20_CONSTEXPR void *memcpy(void *dest, const void *src,
size_t bytes) noexcept;
//------------------------------------------------------------------------------
/// \defgroup cxx_data slices and buffers
/// @{
#if MDBX_HAVE_CXX20_CONCEPTS
template <typename T>
@@ -2741,6 +2752,8 @@ struct pair_result : public pair {
}
};
/// end of cxx_data @}
//------------------------------------------------------------------------------
/// \brief Loop control constants for readers enumeration functor and other
@@ -5877,12 +5890,18 @@ inline bool cursor::erase(const slice &key, const slice &value) {
return data.done && erase();
}
/// end cxx_api @}
} // namespace mdbx
//------------------------------------------------------------------------------
/// \brief The `std:: namespace part of libmdbx C++ API
/// \ingroup cxx_api
namespace std {
/// \defgroup cxx_api C++ API
/// @{
inline string to_string(const ::mdbx::slice &value) {
ostringstream out;
out << value;
@@ -5974,10 +5993,9 @@ template <> struct hash<::mdbx::slice> {
}
};
/// end cxx_api @}
} // namespace std
#ifdef _MSC_VER
#pragma warning(pop)
#endif
/// @} end of C++ API