Browse Source

Make it discoverable that Debug etc is brought into the Magnum namespace.

pull/518/head
Vladimír Vondruš 5 years ago
parent
commit
c927824562
  1. 5
      doc/changelog.dox
  2. 38
      src/Magnum/Magnum.h

5
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 @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)) [mosra/magnum#439](https://github.com/mosra/magnum/issues/439))
- Various documentation fixes (see [mosra/magnum#492](https://github.com/mosra/magnum/issues/492)) - 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 @section changelog-2020-06 2020.06

38
src/Magnum/Magnum.h

@ -43,11 +43,47 @@ namespace Magnum {
/* Bring whole Corrade namespace */ /* Bring whole Corrade namespace */
using namespace Corrade; 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::Debug;
using Corrade::Utility::Warning; using Corrade::Utility::Warning;
using Corrade::Utility::Error; using Corrade::Utility::Error;
using Corrade::Utility::Fatal; using Corrade::Utility::Fatal;
#endif
#ifdef DOXYGEN_GENERATING_OUTPUT #ifdef DOXYGEN_GENERATING_OUTPUT
/** /**

Loading…
Cancel
Save