From c92782456264572a3131c0572c56fb1715cb4c00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Mon, 26 Apr 2021 12:04:32 +0200 Subject: [PATCH] Make it discoverable that Debug etc is brought into the Magnum namespace. --- doc/changelog.dox | 5 +++++ src/Magnum/Magnum.h | 38 +++++++++++++++++++++++++++++++++++++- 2 files changed, 42 insertions(+), 1 deletion(-) diff --git a/doc/changelog.dox b/doc/changelog.dox index 637121113..9626ca85d 100644 --- a/doc/changelog.dox +++ b/doc/changelog.dox @@ -648,6 +648,11 @@ See also: @ref platforms-windows "Windows platform docs" (see [mosra/magnum#227](https://github.com/mosra/magnum/issues/227) and [mosra/magnum#439](https://github.com/mosra/magnum/issues/439)) - Various documentation fixes (see [mosra/magnum#492](https://github.com/mosra/magnum/issues/492)) +- @ref Corrade::Utility::Debug and friends were always brought to the ) + @ref Magnum namespace via a @cpp using @ce directive, but this was never + reflected in the docs and thus hidden from users. Now it's shown in the + docs as a set of @ref Debug etc typedefs instead, to make them more + discoverable. @section changelog-2020-06 2020.06 diff --git a/src/Magnum/Magnum.h b/src/Magnum/Magnum.h index 4d68ab0df..2d39b24aa 100644 --- a/src/Magnum/Magnum.h +++ b/src/Magnum/Magnum.h @@ -43,11 +43,47 @@ namespace Magnum { /* Bring whole Corrade namespace */ using namespace Corrade; -/* Bring debugging facility from Corrade::Utility namespace */ +#ifdef DOXYGEN_GENERATING_OUTPUT +/** +@brief Alias for debug output + +A shorthand for the fully-qualified name in Corrade. +@see @ref Warning, @ref Error, @ref Fatal, + @ref Corrade::TestSuite::Tester::Debug +*/ +typedef Corrade::Utility::Debug Debug; + +/** +@brief Alias for warning output + +A shorthand for the fully-qualified name in Corrade. +@see @ref Debug, @ref Error, @ref Fatal, + @ref Corrade::TestSuite::Tester::Warning +*/ +typedef Corrade::Utility::Warning Warning; + +/** +@brief Alias for error output + +A shorthand for the fully-qualified name in Corrade. +@see @ref Debug, @ref Warning, @ref Fatal, + @ref Corrade::TestSuite::Tester::Error +*/ +typedef Corrade::Utility::Error Error; + +/** +@brief Alias for fatal output + +A shorthand for the fully-qualified name in Corrade. +@see @ref Debug, @ref Warning, @ref Error +*/ +typedef Corrade::Utility::Fatal Fatal; +#else using Corrade::Utility::Debug; using Corrade::Utility::Warning; using Corrade::Utility::Error; using Corrade::Utility::Fatal; +#endif #ifdef DOXYGEN_GENERATING_OUTPUT /**