Browse Source

doc: explicitly prefix all Corrade API references with Corrade::.

Doxygen 1.12 has no longer a completely insane matcher and discards
those as it should. With 1.8.17 classes had to be referenced with
Corrade:: but functions, typedefs and variables didn't need to be and it
was a complete utter chaos.
pull/650/head
Vladimír Vondruš 2 years ago
parent
commit
7a05ddbf07
  1. 15
      doc/changelog.dox
  2. 2
      doc/developers.dox
  3. 12
      src/Magnum/Array.h
  4. 2
      src/Magnum/GL/DebugOutput.h
  5. 14
      src/Magnum/GL/PixelFormat.h
  6. 15
      src/Magnum/GL/TextureFormat.h
  7. 11
      src/Magnum/MaterialTools/Merge.h
  8. 2
      src/Magnum/Math/Algorithms/Svd.h
  9. 20
      src/Magnum/Math/FunctionsBatch.h
  10. 2
      src/Magnum/Math/TypeTraits.h
  11. 5
      src/Magnum/SceneTools/sceneconverter.cpp
  12. 6
      src/Magnum/ShaderTools/AbstractConverter.h
  13. 17
      src/Magnum/Text/AbstractGlyphCache.h
  14. 6
      src/Magnum/Text/Feature.h
  15. 8
      src/Magnum/Text/Script.h
  16. 72
      src/Magnum/Trade/AbstractImageConverter.h
  17. 111
      src/Magnum/Trade/AbstractImporter.h
  18. 95
      src/Magnum/Trade/AbstractSceneConverter.h
  19. 71
      src/Magnum/Trade/MaterialData.h
  20. 2
      src/Magnum/Trade/MeshData.h
  21. 54
      src/Magnum/Trade/SceneData.h
  22. 14
      src/Magnum/Vk/DescriptorPool.h
  23. 13
      src/Magnum/Vk/DeviceProperties.h
  24. 15
      src/Magnum/Vk/PixelFormat.h

15
doc/changelog.dox

@ -1257,8 +1257,9 @@ See also:
[mosra/corrade#139](https://github.com/mosra/corrade/issues/139). [mosra/corrade#139](https://github.com/mosra/corrade/issues/139).
- @ref GL::DebugOutput::setCallback() taking a @ref std::string in the - @ref GL::DebugOutput::setCallback() taking a @ref std::string in the
callback function pointer is deprecated in favor of a version taking a callback function pointer is deprecated in favor of a version taking a
@ref Containers::StringView. See also [mosra/magnum#499](https://github.com/mosra/magnum/pull/499) @relativeref{Corrade,Containers::StringView}. See also
and [mosra/magnum#596](https://github.com/mosra/magnum/pull/596). [mosra/magnum#499](https://github.com/mosra/magnum/pull/499) and
[mosra/magnum#596](https://github.com/mosra/magnum/pull/596).
- @cpp GL::MeshView::setIndexRange() @ce is deprecated in favor of - @cpp GL::MeshView::setIndexRange() @ce is deprecated in favor of
@ref GL::MeshView::setIndexOffset() that has a much less confusing name @ref GL::MeshView::setIndexOffset() that has a much less confusing name
- @cpp GL::Mesh::indexTypeSize() @ce is deprecated in favor of a standalone - @cpp GL::Mesh::indexTypeSize() @ce is deprecated in favor of a standalone
@ -1524,8 +1525,8 @@ See also:
scheme used elsewhere scheme used elsewhere
- The signature of @ref Trade::AbstractSceneConverter::convertToFile() was - The signature of @ref Trade::AbstractSceneConverter::convertToFile() was
changed to have input first and output second, for consistency with other changed to have input first and output second, for consistency with other
interfaces, together with a switch to @ref Containers::StringView. The interfaces, together with a switch to @relativeref{Corrade,Containers::StringView}.
original signature is marked as deprecated. The original signature is marked as deprecated.
- The @cpp Trade::AnimationTrackTargetType @ce enum and - The @cpp Trade::AnimationTrackTargetType @ce enum and
@cpp Trade::AnimationData::trackTargetType() @ce is deprecated in favor of @cpp Trade::AnimationData::trackTargetType() @ce is deprecated in favor of
a shorter and less confusing @ref Trade::AnimationTrackTarget and a shorter and less confusing @ref Trade::AnimationTrackTarget and
@ -1665,9 +1666,9 @@ See also:
- All @ref Math APIs that took or returned @ref std::pair now use - All @ref Math APIs that took or returned @ref std::pair now use
@relativeref{Corrade,Containers::Pair} instead @relativeref{Corrade,Containers::Pair} instead
- @ref Text::AbstractFont public APIs now take - @ref Text::AbstractFont public APIs now take
@ref Containers::StringView instead of @ref std::string and return @relativeref{Corrade,Containers::StringView} instead of @ref std::string
@relativeref{Corrade,Containers::Pair} instead of @ref std::pair. and return @relativeref{Corrade,Containers::Pair} instead of
Additionally, the internal implementation relies on @ref std::pair. Additionally, the internal implementation relies on
@ref Corrade::Containers::ArrayView "Containers::ArrayView<const char32_t>" @ref Corrade::Containers::ArrayView "Containers::ArrayView<const char32_t>"
instead of @ref std::u32string and instead of @ref std::u32string and
@relativeref{Corrade,Containers::Triple} instead of @ref std::tuple, @relativeref{Corrade,Containers::Triple} instead of @ref std::tuple,

2
doc/developers.dox

@ -269,7 +269,7 @@ following cases apply:
user code changes as well), for example when renaming a "open file" method user code changes as well), for example when renaming a "open file" method
- Bump only the minor version if signature of some methods change, - Bump only the minor version if signature of some methods change,
potentially requiring changes in user code, for example when porting from potentially requiring changes in user code, for example when porting from
@ref std::string to @ref Containers::StringView @ref std::string to @relativeref{Corrade,Containers::StringView}
- Bump only the patch version if the change doesn't affect existing user code - Bump only the patch version if the change doesn't affect existing user code
but breaks ABI, for example when adding a new virtual function --- this is but breaks ABI, for example when adding a new virtual function --- this is
mainly to prevent crashes when loading of plugins built against an older mainly to prevent crashes when loading of plugins built against an older

12
src/Magnum/Array.h

@ -147,8 +147,8 @@ CORRADE_IGNORE_DEPRECATED_PUSH
/** /**
@brief One-dimensional array @brief One-dimensional array
@tparam T Data type @tparam T Data type
@m_deprecated_since_latest Use @ref Math::Vector or @ref Containers::Array1 @m_deprecated_since_latest Use @ref Math::Vector or
instead. @relativeref{Corrade,Containers::Array1} instead.
*/ */
template<class T> class CORRADE_DEPRECATED("use Math::Vector or Containers::Array1 instead") Array1D: public Array<1, T> { template<class T> class CORRADE_DEPRECATED("use Math::Vector or Containers::Array1 instead") Array1D: public Array<1, T> {
public: public:
@ -171,8 +171,8 @@ template<class T> class CORRADE_DEPRECATED("use Math::Vector or Containers::Arra
/** /**
@brief Two-dimensional array @brief Two-dimensional array
@tparam T Data type @tparam T Data type
@m_deprecated_since_latest Use @ref Math::Vector2 or @ref Containers::Array2 @m_deprecated_since_latest Use @ref Math::Vector2 or
instead. @relativeref{Corrade,Containers::Array2} instead.
*/ */
template<class T> class CORRADE_DEPRECATED("use Math::Vector2 or Containers::Array2 instead") Array2D: public Array<2, T> { template<class T> class CORRADE_DEPRECATED("use Math::Vector2 or Containers::Array2 instead") Array2D: public Array<2, T> {
public: public:
@ -206,8 +206,8 @@ template<class T> class CORRADE_DEPRECATED("use Math::Vector2 or Containers::Arr
/** /**
@brief Three-dimensional array @brief Three-dimensional array
@tparam T Data type @tparam T Data type
@m_deprecated_since_latest Use @ref Math::Vector3 or @ref Containers::Array3 @m_deprecated_since_latest Use @ref Math::Vector3 or
instead. @relativeref{Corrade,Containers::Array3} instead.
*/ */
template<class T> class CORRADE_DEPRECATED("use Math::Vector3 or Containers::Array3 instead") Array3D: public Array<3, T> { template<class T> class CORRADE_DEPRECATED("use Math::Vector3 or Containers::Array3 instead") Array3D: public Array<3, T> {
public: public:

2
src/Magnum/GL/DebugOutput.h

@ -405,7 +405,7 @@ class MAGNUM_GL_EXPORT DebugOutput {
/** /**
* @brief Set debug message callback * @brief Set debug message callback
* @m_deprecated_since_latest Use a @ref Callback taking a * @m_deprecated_since_latest Use a @ref Callback taking a
* @ref Containers::StringView instead. * @relativeref{Corrade,Containers::StringView} instead.
*/ */
CORRADE_DEPRECATED("use a callback taking a Containers::StringView instead") static void setCallback(void(*callback)(Source, Type, UnsignedInt, Severity, const std::string&, const void*), const void* userParam = nullptr); CORRADE_DEPRECATED("use a callback taking a Containers::StringView instead") static void setCallback(void(*callback)(Source, Type, UnsignedInt, Severity, const std::string&, const void*), const void* userParam = nullptr);
#ifndef DOXYGEN_GENERATING_OUTPUT #ifndef DOXYGEN_GENERATING_OUTPUT

14
src/Magnum/GL/PixelFormat.h

@ -719,10 +719,10 @@ CORRADE_DEPRECATED("use pixelFormatSize() instead") inline UnsignedInt pixelSize
@brief Convert OpenGL pixel format and type combination to a generic pixel format @brief Convert OpenGL pixel format and type combination to a generic pixel format
@m_since_latest @m_since_latest
Returns @ref Containers::NullOpt if given combination doesn't match any generic Returns @relativeref{Corrade,Containers::NullOpt} if given combination doesn't
pixel format. Otherwise the returned value will result in the same @p format match any generic pixel format. Otherwise the returned value will result in the
and @p type when passed back to @ref pixelFormat(Magnum::PixelFormat) and same @p format and @p type when passed back to @ref pixelFormat(Magnum::PixelFormat)
@ref pixelType(Magnum::PixelFormat, UnsignedInt). and @ref pixelType(Magnum::PixelFormat, UnsignedInt).
An exception is sRGB formats --- those map to the same OpenGL format + type An exception is sRGB formats --- those map to the same OpenGL format + type
combination, e.g. @ref Magnum::PixelFormat::RGBA8Unorm and combination, e.g. @ref Magnum::PixelFormat::RGBA8Unorm and
@ -2160,9 +2160,9 @@ MAGNUM_GL_EXPORT CompressedPixelFormat compressedPixelFormat(Magnum::CompressedP
@brief Convert OpenGL compressed pixel format to a generic compressed pixel format @brief Convert OpenGL compressed pixel format to a generic compressed pixel format
@m_since_latest @m_since_latest
Returns @ref Containers::NullOpt if given format doesn't match any generic Returns @relativeref{Corrade,Containers::NullOpt} if given format doesn't match
pixel format. Otherwise the returned value will result in the same @p format any generic pixel format. Otherwise the returned value will result in the same
when passed back to @ref compressedPixelFormat(Magnum::CompressedPixelFormat). @p format when passed back to @ref compressedPixelFormat(Magnum::CompressedPixelFormat).
An exception is ASTC float and normalized formats --- those map to the same An exception is ASTC float and normalized formats --- those map to the same
OpenGL format, e.g. @ref Magnum::CompressedPixelFormat::Astc4x4RGBAUnorm and OpenGL format, e.g. @ref Magnum::CompressedPixelFormat::Astc4x4RGBAUnorm and

15
src/Magnum/GL/TextureFormat.h

@ -2707,9 +2707,10 @@ MAGNUM_GL_EXPORT TextureFormat textureFormat(Magnum::CompressedPixelFormat forma
@brief Convert OpenGL texture format to a generic pixel format @brief Convert OpenGL texture format to a generic pixel format
@m_since_latest @m_since_latest
Returns @ref Containers::NullOpt if given format is compressed or if it doesn't Returns @relativeref{Corrade,Containers::NullOpt} if given format is compressed
match any generic pixel format. Otherwise the returned value will result in the or if it doesn't match any generic pixel format. Otherwise the returned value
same @p format when passed back to @ref textureFormat(Magnum::PixelFormat). will result in the same @p format when passed back to
@ref textureFormat(Magnum::PixelFormat).
Unlike mapping *from* a generic pixel format, the inverse operation is done Unlike mapping *from* a generic pixel format, the inverse operation is done
with an @f$ \mathcal{O}(n) @f$ complexity. with an @f$ \mathcal{O}(n) @f$ complexity.
@ -2721,10 +2722,10 @@ MAGNUM_GL_EXPORT Containers::Optional<Magnum::PixelFormat> genericPixelFormat(Te
@brief Convert OpenGL compressed texture format to a generic compressed pixel format @brief Convert OpenGL compressed texture format to a generic compressed pixel format
@m_since_latest @m_since_latest
Returns @ref Containers::NullOpt if given format is not compressed or if it Returns @relativeref{Corrade,Containers::NullOpt} if given format is not
doesn't match any generic compressed pixel format. Otherwise the returned value compressed or if it doesn't match any generic compressed pixel format.
will result in the same @p format when passed back to Otherwise the returned value will result in the same @p format when passed back
@ref textureFormat(Magnum::CompressedPixelFormat). to @ref textureFormat(Magnum::CompressedPixelFormat).
An exception is ASTC float and normalized formats --- those map to the same An exception is ASTC float and normalized formats --- those map to the same
OpenGL format, e.g. @ref Magnum::CompressedPixelFormat::Astc4x4RGBAUnorm and OpenGL format, e.g. @ref Magnum::CompressedPixelFormat::Astc4x4RGBAUnorm and

11
src/Magnum/MaterialTools/Merge.h

@ -44,9 +44,10 @@ namespace Magnum { namespace MaterialTools {
enum MergeConflicts: UnsignedInt { enum MergeConflicts: UnsignedInt {
/** /**
* Print a message to @relativeref{Magnum,Error} and return * Print a message to @relativeref{Magnum,Error} and return
* @ref Containers::NullOpt in case both materials contain an attribute of * @relativeref{Corrade,Containers::NullOpt} in case both materials contain
* the same name in the same layer index. Neither its type nor its value is * an attribute of the same name in the same layer index. Neither its type
* checked, so this fails also in case the values are the same. * nor its value is checked, so this fails also in case the values are the
* same.
*/ */
Fail, Fail,
@ -54,8 +55,8 @@ enum MergeConflicts: UnsignedInt {
* Keep the value from the first material in case both materials contain an * Keep the value from the first material in case both materials contain an
* attribute of the same name in the same layer index and both attributes * attribute of the same name in the same layer index and both attributes
* have the same type. Print a message to @relativeref{Magnum,Error} and * have the same type. Print a message to @relativeref{Magnum,Error} and
* return @ref Containers::NullOpt if they have a different type, for * return @relativeref{Corrade,Containers::NullOpt} if they have a
* example in case of custom attributes. * different type, for example in case of custom attributes.
* *
* If you want to keep the value from the second material instead, call * If you want to keep the value from the second material instead, call
* @ref merge() with this option and the materials swapped. * @ref merge() with this option and the materials swapped.

2
src/Magnum/Math/Algorithms/Svd.h

@ -66,7 +66,7 @@ on given matrix where @p rows >= `cols`: @f[
Returns first @p cols column vectors of @f$ \boldsymbol{U} @f$, diagonal of Returns first @p cols column vectors of @f$ \boldsymbol{U} @f$, diagonal of
@f$ \boldsymbol{\Sigma} @f$ and non-transposed @f$ \boldsymbol{V} @f$. If the @f$ \boldsymbol{\Sigma} @f$ and non-transposed @f$ \boldsymbol{V} @f$. If the
solution doesn't converge, returns @ref Containers::NullOpt. solution doesn't converge, returns @relativeref{Corrade,Containers::NullOpt}.
Full @f$ \boldsymbol{U} @f$, @f$ \boldsymbol{\Sigma} @f$ matrices and original Full @f$ \boldsymbol{U} @f$, @f$ \boldsymbol{\Sigma} @f$ matrices and original
@f$ \boldsymbol{M} @f$ matrix can be reconstructed from the values as @f$ \boldsymbol{M} @f$ matrix can be reconstructed from the values as

20
src/Magnum/Math/FunctionsBatch.h

@ -89,8 +89,8 @@ template<class T> auto isInf(const Containers::StridedArrayView1D<const T>& rang
@overload @overload
@m_since{2020,06} @m_since{2020,06}
Converts @p range to @ref Containers::StridedArrayView1D and calls the above Converts @p range to @relativeref{Corrade,Containers::StridedArrayView1D} and
overload. Works with any type that's convertible to calls the above overload. Works with any type that's convertible to
@relativeref{Corrade,Containers::StridedArrayView}. @relativeref{Corrade,Containers::StridedArrayView}.
*/ */
template<class Iterable, class T = decltype(Implementation::stridedArrayViewTypeFor(std::declval<Iterable&&>()))> inline auto isInf(Iterable&& range) -> decltype(isInf(std::declval<T>())) { template<class Iterable, class T = decltype(Implementation::stridedArrayViewTypeFor(std::declval<Iterable&&>()))> inline auto isInf(Iterable&& range) -> decltype(isInf(std::declval<T>())) {
@ -141,8 +141,8 @@ template<class T> inline auto isNan(const Containers::StridedArrayView1D<const T
@overload @overload
@m_since{2020,06} @m_since{2020,06}
Converts @p range to @ref Containers::StridedArrayView1D and calls the above Converts @p range to @relativeref{Corrade,Containers::StridedArrayView1D} and
overload. Works with any type that's convertible to calls the above overload. Works with any type that's convertible to
@relativeref{Corrade,Containers::StridedArrayView}. @relativeref{Corrade,Containers::StridedArrayView}.
*/ */
/* See isInf() for why arrayView() and not stridedArrayView() */ /* See isInf() for why arrayView() and not stridedArrayView() */
@ -221,8 +221,8 @@ template<class T> inline T min(const Containers::StridedArrayView1D<const T>& ra
@overload @overload
@m_since{2020,06} @m_since{2020,06}
Converts @p range to @ref Containers::StridedArrayView1D and calls the above Converts @p range to @relativeref{Corrade,Containers::StridedArrayView1D} and
overload. Works with any type that's convertible to calls the above overload. Works with any type that's convertible to
@relativeref{Corrade,Containers::StridedArrayView}. @relativeref{Corrade,Containers::StridedArrayView}.
*/ */
template<class Iterable, class T = decltype(Implementation::stridedArrayViewTypeFor(std::declval<Iterable&&>()))> inline T min(Iterable&& range) { template<class Iterable, class T = decltype(Implementation::stridedArrayViewTypeFor(std::declval<Iterable&&>()))> inline T min(Iterable&& range) {
@ -266,8 +266,8 @@ template<class T> inline T max(const Containers::StridedArrayView1D<const T>& ra
@overload @overload
@m_since{2020,06} @m_since{2020,06}
Converts @p range to @ref Containers::StridedArrayView1D and calls the above Converts @p range to @relativeref{Corrade,Containers::StridedArrayView1D} and
overload. Works with any type that's convertible to calls the above overload. Works with any type that's convertible to
@relativeref{Corrade,Containers::StridedArrayView}. @relativeref{Corrade,Containers::StridedArrayView}.
*/ */
template<class Iterable, class T = decltype(Implementation::stridedArrayViewTypeFor(std::declval<Iterable&&>()))> inline T max(Iterable&& range) { template<class Iterable, class T = decltype(Implementation::stridedArrayViewTypeFor(std::declval<Iterable&&>()))> inline T max(Iterable&& range) {
@ -327,8 +327,8 @@ template<class T> inline Containers::Pair<T, T> minmax(const Containers::Strided
@overload @overload
@m_since{2020,06} @m_since{2020,06}
Converts @p range to @ref Containers::StridedArrayView1D and calls the above Converts @p range to @relativeref{Corrade,Containers::StridedArrayView1D} and
overload. Works with any type that's convertible to calls the above overload. Works with any type that's convertible to
@relativeref{Corrade,Containers::StridedArrayView}. @relativeref{Corrade,Containers::StridedArrayView}.
*/ */
template<class Iterable, class T = decltype(Implementation::stridedArrayViewTypeFor(std::declval<Iterable&&>()))> inline Containers::Pair<T, T> minmax(Iterable&& range) { template<class Iterable, class T = decltype(Implementation::stridedArrayViewTypeFor(std::declval<Iterable&&>()))> inline Containers::Pair<T, T> minmax(Iterable&& range) {

2
src/Magnum/Math/TypeTraits.h

@ -364,7 +364,7 @@ template<class T> struct TypeTraits: Implementation::TypeTraitsDefault<T> {
* *
* This matches fuzzy comparison precision in * This matches fuzzy comparison precision in
* @relativeref{Corrade,TestSuite} and is always one digit less than how * @relativeref{Corrade,TestSuite} and is always one digit less than how
* @ref Debug or @ref Utility::format() prints given type. * @ref Debug or @relativeref{Corrade,Utility::format()} prints given type.
*/ */
constexpr static T epsilon(); constexpr static T epsilon();

5
src/Magnum/SceneTools/sceneconverter.cpp

@ -219,8 +219,9 @@ Arguments:
- `--map` --- memory-map the input for zero-copy import (works only for - `--map` --- memory-map the input for zero-copy import (works only for
standalone files) standalone files)
- `--only-mesh-attributes N1,N2-N3` --- include only mesh attributes of - `--only-mesh-attributes N1,N2-N3` --- include only mesh attributes of
given IDs in the output. See @ref Utility::String::parseNumberSequence() given IDs in the output. See
for syntax description. @relativeref{Corrade,Utility::String::parseNumberSequence()} for syntax
description.
- `--remove-duplicate-vertices` --- remove duplicate vertices using - `--remove-duplicate-vertices` --- remove duplicate vertices using
@ref MeshTools::removeDuplicates(const Trade::MeshData&) in all meshes @ref MeshTools::removeDuplicates(const Trade::MeshData&) in all meshes
after import after import

6
src/Magnum/ShaderTools/AbstractConverter.h

@ -859,7 +859,7 @@ class MAGNUM_SHADERTOOLS_EXPORT AbstractConverter: public PluginManager::Abstrac
* *
* Available only if @ref ConverterFeature::ConvertData is supported. * Available only if @ref ConverterFeature::ConvertData is supported.
* On failure prints a message to @relativeref{Magnum,Error} and * On failure prints a message to @relativeref{Magnum,Error} and
* returns @ref Containers::NullOpt. * returns @relativeref{Corrade,Containers::NullOpt}.
* @see @ref features(), @ref convertFileToFile(), * @see @ref features(), @ref convertFileToFile(),
* @ref convertDataToFile(), @ref convertDataToData() * @ref convertDataToFile(), @ref convertDataToData()
*/ */
@ -875,7 +875,7 @@ class MAGNUM_SHADERTOOLS_EXPORT AbstractConverter: public PluginManager::Abstrac
* *
* Available only if @ref ConverterFeature::LinkData is supported. On * Available only if @ref ConverterFeature::LinkData is supported. On
* failure prints a message to @relativeref{Magnum,Error} and returns * failure prints a message to @relativeref{Magnum,Error} and returns
* @ref Containers::NullOpt. Can't be called if * @relativeref{Corrade,Containers::NullOpt}. Can't be called if
* @ref ConverterFlag::PreprocessOnly is set --- in that case * @ref ConverterFlag::PreprocessOnly is set --- in that case
* @ref convertDataToData() has to be used instead. * @ref convertDataToData() has to be used instead.
* @see @ref features() @ref linkDataToFile(), @ref linkFilesToFile() * @see @ref features() @ref linkDataToFile(), @ref linkFilesToFile()
@ -935,7 +935,7 @@ class MAGNUM_SHADERTOOLS_EXPORT AbstractConverter: public PluginManager::Abstrac
* *
* Available only if @ref ConverterFeature::LinkData is supported. On * Available only if @ref ConverterFeature::LinkData is supported. On
* failure prints a message to @relativeref{Magnum,Error} and returns * failure prints a message to @relativeref{Magnum,Error} and returns
* @ref Containers::NullOpt. Can't be called if * @relativeref{Corrade,Containers::NullOpt}. Can't be called if
* @ref ConverterFlag::PreprocessOnly is set --- in that case * @ref ConverterFlag::PreprocessOnly is set --- in that case
* @ref convertFileToData() has to be used instead. * @ref convertFileToData() has to be used instead.
* @see @ref features(), @ref linkFilesToFile(), @ref linkDataToFile(), * @see @ref features(), @ref linkFilesToFile(), @ref linkDataToFile(),

17
src/Magnum/Text/AbstractGlyphCache.h

@ -224,11 +224,12 @@ for a font-specific glyph ID @cpp 0 @ce.
A glyph cache can be queried for ID of a particular font with @ref findFont(), A glyph cache can be queried for ID of a particular font with @ref findFont(),
passing the @ref AbstractFont pointer to it. If no font with such pointer was passing the @ref AbstractFont pointer to it. If no font with such pointer was
added, the function returns @ref Containers::NullOpt. Then, for a particular added, the function returns @relativeref{Corrade,Containers::NullOpt}. Then,
font ID a font-specific glyph ID can be queried with @ref glyphId(). If no such for a particular font ID a font-specific glyph ID can be queried with
glyph was added yet, the function returns @cpp 0 @ce, i.e. the invalid glyph. @ref glyphId(). If no such glyph was added yet, the function returns
The @ref glyph() function then directly returns data for given glyph, or the @cpp 0 @ce, i.e. the invalid glyph. The @ref glyph() function then directly
invalid glyph data in case the glyph wasn't found. returns data for given glyph, or the invalid glyph data in case the glyph
wasn't found.
@snippet Text.cpp AbstractGlyphCache-querying @snippet Text.cpp AbstractGlyphCache-querying
@ -540,9 +541,9 @@ class MAGNUM_TEXT_EXPORT AbstractGlyphCache {
* @m_since_latest * @m_since_latest
* *
* Returns a font ID if a pointer matching @p font was used in an * Returns a font ID if a pointer matching @p font was used in an
* earlier @ref addFont() call, @ref Containers::NullOpt otherwise. The * earlier @ref addFont() call, @relativeref{Corrade,Containers::NullOpt}
* lookup is done with an @f$ \mathcal{O}(n) @f$ complexity with * otherwise. The lookup is done with an @f$ \mathcal{O}(n) @f$
* @f$ n @f$ being @ref fontCount(). * complexity with @f$ n @f$ being @ref fontCount().
*/ */
Containers::Optional<UnsignedInt> findFont(const AbstractFont& font) const; Containers::Optional<UnsignedInt> findFont(const AbstractFont& font) const;

6
src/Magnum/Text/Feature.h

@ -1839,9 +1839,9 @@ MAGNUM_TEXT_EXPORT Debug& operator<<(Debug& debug, Feature value);
@brief Create a @ref Feature value from a four-character code @brief Create a @ref Feature value from a four-character code
@m_since_latest @m_since_latest
Delegates to @ref Utility::Endianness::fourCC(). Doesn't perform any validity Delegates to @relativeref{Corrade,Utility::Endianness::fourCC()}. Doesn't
check on the input, i.e. it's possible to create a code that isn't listed in perform any validity check on the input, i.e. it's possible to create a code
the [OpenType feature registry](https://learn.microsoft.com/typography/opentype/spec/featurelist) that isn't listed in the [OpenType feature registry](https://learn.microsoft.com/typography/opentype/spec/featurelist)
or even a code with non-ASCII characters. or even a code with non-ASCII characters.
@see @ref feature(Containers::StringView) @see @ref feature(Containers::StringView)
*/ */

8
src/Magnum/Text/Script.h

@ -893,10 +893,10 @@ MAGNUM_TEXT_EXPORT Debug& operator<<(Debug& debug, Script value);
@brief Create a @ref Script value from a four-character code @brief Create a @ref Script value from a four-character code
@m_since_latest @m_since_latest
Delegates to @ref Utility::Endianness::fourCC(). Doesn't perform any validity Delegates to @relativeref{Corrade,Utility::Endianness::fourCC()}. Doesn't
check on the input, i.e. it's possible to create a code that isn't listed in perform any validity check on the input, i.e. it's possible to create a code
[ISO 15924](https://en.wikipedia.org/wiki/ISO_15924) or even a code with that isn't listed in [ISO 15924](https://en.wikipedia.org/wiki/ISO_15924) or
non-ASCII characters. even a code with non-ASCII characters.
@see @ref script(Containers::StringView) @see @ref script(Containers::StringView)
*/ */
constexpr Script script(char a, char b, char c, char d) { constexpr Script script(char a, char b, char c, char d) {

72
src/Magnum/Trade/AbstractImageConverter.h

@ -760,9 +760,10 @@ class MAGNUM_TRADE_EXPORT AbstractImageConverter: public PluginManager::Abstract
* *
* Available only if @ref ImageConverterFeature::Convert1D is * Available only if @ref ImageConverterFeature::Convert1D is
* supported. On failure prints a message to @relativeref{Magnum,Error} * supported. On failure prints a message to @relativeref{Magnum,Error}
* and returns @ref Containers::NullOpt. The implementation is allowed * and returns @relativeref{Corrade,Containers::NullOpt}. The
* to return both a compressed an an uncompressed image, see * implementation is allowed to return both a compressed and an
* documentation of a particular converter for more information. * uncompressed image, see documentation of a particular converter for
* more information.
* @see @ref features(), @ref convert(const CompressedImageView1D&), * @see @ref features(), @ref convert(const CompressedImageView1D&),
* @ref convert(const ImageData1D&), @ref convertToData(), * @ref convert(const ImageData1D&), @ref convertToData(),
* @ref convertToFile(), @ref ImageData::isCompressed() * @ref convertToFile(), @ref ImageData::isCompressed()
@ -775,9 +776,10 @@ class MAGNUM_TRADE_EXPORT AbstractImageConverter: public PluginManager::Abstract
* *
* Available only if @ref ImageConverterFeature::Convert2D is * Available only if @ref ImageConverterFeature::Convert2D is
* supported. On failure prints a message to @relativeref{Magnum,Error} * supported. On failure prints a message to @relativeref{Magnum,Error}
* and returns @ref Containers::NullOpt. The implementation is allowed * and returns @relativeref{Corrade,Containers::NullOpt}. The
* to return both a compressed an an uncompressed image, see * implementation is allowed to return both a compressed and an
* documentation of a particular converter for more information. * uncompressed image, see documentation of a particular converter for
* more information.
* @see @ref features(), @ref convert(const CompressedImageView2D&), * @see @ref features(), @ref convert(const CompressedImageView2D&),
* @ref convert(const ImageData2D&), @ref convertToData(), * @ref convert(const ImageData2D&), @ref convertToData(),
* @ref convertToFile(), @ref ImageData::isCompressed() * @ref convertToFile(), @ref ImageData::isCompressed()
@ -806,9 +808,10 @@ class MAGNUM_TRADE_EXPORT AbstractImageConverter: public PluginManager::Abstract
* *
* Available only if @ref ImageConverterFeature::Convert3D is * Available only if @ref ImageConverterFeature::Convert3D is
* supported. On failure prints a message to @relativeref{Magnum,Error} * supported. On failure prints a message to @relativeref{Magnum,Error}
* and returns @ref Containers::NullOpt. The implementation is allowed * and returns @relativeref{Corrade,Containers::NullOpt}. The
* to return both a compressed an an uncompressed image, see * implementation is allowed to return both a compressed and an
* documentation of a particular converter for more information. * uncompressed image, see documentation of a particular converter for
* more information.
* @see @ref features(), @ref convert(const CompressedImageView3D&), * @see @ref features(), @ref convert(const CompressedImageView3D&),
* @ref convert(const ImageData3D&), @ref convertToData(), * @ref convert(const ImageData3D&), @ref convertToData(),
* @ref convertToFile(), @ref ImageData::isCompressed() * @ref convertToFile(), @ref ImageData::isCompressed()
@ -821,9 +824,10 @@ class MAGNUM_TRADE_EXPORT AbstractImageConverter: public PluginManager::Abstract
* *
* Available only if @ref ImageConverterFeature::ConvertCompressed1D is * Available only if @ref ImageConverterFeature::ConvertCompressed1D is
* supported. On failure prints a message to @relativeref{Magnum,Error} * supported. On failure prints a message to @relativeref{Magnum,Error}
* and returns @ref Containers::NullOpt. The implementation is allowed * and returns @relativeref{Corrade,Containers::NullOpt}. The
* to return both a compressed an an uncompressed image, see * implementation is allowed to return both a compressed and an
* documentation of a particular converter for more information. * uncompressed image, see documentation of a particular converter for
* more information.
* @see @ref features(), @ref convert(const ImageView1D&), * @see @ref features(), @ref convert(const ImageView1D&),
* @ref convert(const ImageData1D&), @ref convertToData(), * @ref convert(const ImageData1D&), @ref convertToData(),
* @ref convertToFile(), @ref ImageData::isCompressed() * @ref convertToFile(), @ref ImageData::isCompressed()
@ -836,9 +840,10 @@ class MAGNUM_TRADE_EXPORT AbstractImageConverter: public PluginManager::Abstract
* *
* Available only if @ref ImageConverterFeature::ConvertCompressed2D is * Available only if @ref ImageConverterFeature::ConvertCompressed2D is
* supported. On failure prints a message to @relativeref{Magnum,Error} * supported. On failure prints a message to @relativeref{Magnum,Error}
* and returns @ref Containers::NullOpt. The implementation is allowed * and returns @relativeref{Corrade,Containers::NullOpt}. The
* to return both a compressed an an uncompressed image, see * implementation is allowed to return both a compressed and an
* documentation of a particular converter for more information. * uncompressed image, see documentation of a particular converter for
* more information.
* @see @ref features(), @ref convert(const ImageView2D&), * @see @ref features(), @ref convert(const ImageView2D&),
* @ref convert(const ImageData2D&), @ref convertToData(), * @ref convert(const ImageData2D&), @ref convertToData(),
* @ref convertToFile(), @ref ImageData::isCompressed() * @ref convertToFile(), @ref ImageData::isCompressed()
@ -851,9 +856,10 @@ class MAGNUM_TRADE_EXPORT AbstractImageConverter: public PluginManager::Abstract
* *
* Available only if @ref ImageConverterFeature::ConvertCompressed3D is * Available only if @ref ImageConverterFeature::ConvertCompressed3D is
* supported. On failure prints a message to @relativeref{Magnum,Error} * supported. On failure prints a message to @relativeref{Magnum,Error}
* and returns @ref Containers::NullOpt. The implementation is allowed * and returns @relativeref{Corrade,Containers::NullOpt}. The
* to return both a compressed an an uncompressed image, see * implementation is allowed to return both a compressed and an
* documentation of a particular converter for more information. * uncompressed image, see documentation of a particular converter for
* more information.
* @see @ref features(), @ref convert(const ImageView3D&), * @see @ref features(), @ref convert(const ImageView3D&),
* @ref convert(const ImageData3D&), @ref convertToData(), * @ref convert(const ImageData3D&), @ref convertToData(),
* @ref convertToFile(), @ref ImageData::isCompressed() * @ref convertToFile(), @ref ImageData::isCompressed()
@ -915,7 +921,8 @@ class MAGNUM_TRADE_EXPORT AbstractImageConverter: public PluginManager::Abstract
* Available only if @ref ImageConverterFeature::Convert1DToData is * Available only if @ref ImageConverterFeature::Convert1DToData is
* supported. The image view is expected to not be @cpp nullptr @ce and * supported. The image view is expected to not be @cpp nullptr @ce and
* to have a non-zero size. On failure prints a message to * to have a non-zero size. On failure prints a message to
* @relativeref{Magnum,Error} and returns @ref Containers::NullOpt. * @relativeref{Magnum,Error} and returns
* @relativeref{Corrade,Containers::NullOpt}.
* @see @ref features(), @ref convertToData(const CompressedImageView1D&), * @see @ref features(), @ref convertToData(const CompressedImageView1D&),
* @ref convertToData(const ImageData1D&), @ref convert(), * @ref convertToData(const ImageData1D&), @ref convert(),
* @ref convertToFile() * @ref convertToFile()
@ -935,7 +942,7 @@ class MAGNUM_TRADE_EXPORT AbstractImageConverter: public PluginManager::Abstract
* supported. The image view is expected to not be @cpp nullptr @ce and * supported. The image view is expected to not be @cpp nullptr @ce and
* to have a non-zero size in all dimensions. On failure prints a * to have a non-zero size in all dimensions. On failure prints a
* message to @relativeref{Magnum,Error} and returns * message to @relativeref{Magnum,Error} and returns
* @ref Containers::NullOpt. * @relativeref{Corrade,Containers::NullOpt}.
* @see @ref features(), @ref convertToData(const CompressedImageView2D&), * @see @ref features(), @ref convertToData(const CompressedImageView2D&),
* @ref convertToData(const ImageData2D&), @ref convert(), * @ref convertToData(const ImageData2D&), @ref convert(),
* @ref convertToFile() * @ref convertToFile()
@ -964,7 +971,7 @@ class MAGNUM_TRADE_EXPORT AbstractImageConverter: public PluginManager::Abstract
* supported. The image view is expected to not be @cpp nullptr @ce and * supported. The image view is expected to not be @cpp nullptr @ce and
* to have a non-zero size in all dimensions. On failure prints a * to have a non-zero size in all dimensions. On failure prints a
* message to @relativeref{Magnum,Error} and returns * message to @relativeref{Magnum,Error} and returns
* @ref Containers::NullOpt. * @relativeref{Corrade,Containers::NullOpt}.
* @see @ref features(), @ref convertToData(const CompressedImageView3D&), * @see @ref features(), @ref convertToData(const CompressedImageView3D&),
* @ref convertToData(const ImageData3D&), @ref convert(), * @ref convertToData(const ImageData3D&), @ref convert(),
* @ref convertToFile() * @ref convertToFile()
@ -983,7 +990,8 @@ class MAGNUM_TRADE_EXPORT AbstractImageConverter: public PluginManager::Abstract
* Available only if @ref ImageConverterFeature::ConvertCompressed1DToData * Available only if @ref ImageConverterFeature::ConvertCompressed1DToData
* is supported. The image view is expected to not be @cpp nullptr @ce * is supported. The image view is expected to not be @cpp nullptr @ce
* and to have a non-zero size. On failure prints a message to * and to have a non-zero size. On failure prints a message to
* @relativeref{Magnum,Error} and returns @ref Containers::NullOpt. * @relativeref{Magnum,Error} and returns
* @relativeref{Corrade,Containers::NullOpt}.
* @see @ref features(), @ref convertToData(const ImageView1D&), * @see @ref features(), @ref convertToData(const ImageView1D&),
* @ref convertToData(const ImageData1D&), @ref convert(), * @ref convertToData(const ImageData1D&), @ref convert(),
* @ref convertToFile() * @ref convertToFile()
@ -1003,7 +1011,7 @@ class MAGNUM_TRADE_EXPORT AbstractImageConverter: public PluginManager::Abstract
* is supported. The image view is expected to not be @cpp nullptr @ce * is supported. The image view is expected to not be @cpp nullptr @ce
* and to have a non-zero size in all dimensions. On failure prints a * and to have a non-zero size in all dimensions. On failure prints a
* message to @relativeref{Magnum,Error} and returns * message to @relativeref{Magnum,Error} and returns
* @ref Containers::NullOpt. * @relativeref{Corrade,Containers::NullOpt}.
* @see @ref features(), @ref convertToData(const ImageView2D&), * @see @ref features(), @ref convertToData(const ImageView2D&),
* @ref convertToData(const ImageData2D&), @ref convert(), * @ref convertToData(const ImageData2D&), @ref convert(),
* @ref convertToFile() * @ref convertToFile()
@ -1032,7 +1040,7 @@ class MAGNUM_TRADE_EXPORT AbstractImageConverter: public PluginManager::Abstract
* is supported. The image view is expected to not be @cpp nullptr @ce * is supported. The image view is expected to not be @cpp nullptr @ce
* and to have a non-zero size in all dimensions. On failure prints a * and to have a non-zero size in all dimensions. On failure prints a
* message to @relativeref{Magnum,Error} and returns * message to @relativeref{Magnum,Error} and returns
* @ref Containers::NullOpt. * @relativeref{Corrade,Containers::NullOpt}.
* @see @ref features(), @ref convertToData(const ImageView3D&), * @see @ref features(), @ref convertToData(const ImageView3D&),
* @ref convertToData(const ImageData3D&), @ref convert(), * @ref convertToData(const ImageData3D&), @ref convert(),
* @ref convertToFile() * @ref convertToFile()
@ -1116,7 +1124,8 @@ class MAGNUM_TRADE_EXPORT AbstractImageConverter: public PluginManager::Abstract
* that certain converters may impose additional size and order * that certain converters may impose additional size and order
* restrictions on the images, see documentation of a particular plugin * restrictions on the images, see documentation of a particular plugin
* for more information. On failure prints a message to * for more information. On failure prints a message to
* @relativeref{Magnum,Error} and returns @ref Containers::NullOpt. * @relativeref{Magnum,Error} and returns
* @relativeref{Corrade,Containers::NullOpt}.
* @see @ref features(), @ref convertToData(Containers::ArrayView<const CompressedImageView1D>), * @see @ref features(), @ref convertToData(Containers::ArrayView<const CompressedImageView1D>),
* @ref convert(), @ref convertToFile() * @ref convert(), @ref convertToFile()
*/ */
@ -1149,7 +1158,8 @@ class MAGNUM_TRADE_EXPORT AbstractImageConverter: public PluginManager::Abstract
* flags. Note that certain converters may impose additional size and * flags. Note that certain converters may impose additional size and
* order restrictions on the images, see documentation of a particular * order restrictions on the images, see documentation of a particular
* plugin for more information. On failure prints a message to * plugin for more information. On failure prints a message to
* @relativeref{Magnum,Error} and returns @ref Containers::NullOpt. * @relativeref{Magnum,Error} and returns
* @relativeref{Corrade,Containers::NullOpt}.
* @see @ref features(), @ref convertToData(Containers::ArrayView<const CompressedImageView2D>), * @see @ref features(), @ref convertToData(Containers::ArrayView<const CompressedImageView2D>),
* @ref convert(), @ref convertToFile() * @ref convert(), @ref convertToFile()
*/ */
@ -1182,7 +1192,8 @@ class MAGNUM_TRADE_EXPORT AbstractImageConverter: public PluginManager::Abstract
* flags. Note that certain converters may impose additional size and * flags. Note that certain converters may impose additional size and
* order restrictions on the images, see documentation of a particular * order restrictions on the images, see documentation of a particular
* plugin for more information. On failure prints a message to * plugin for more information. On failure prints a message to
* @relativeref{Magnum,Error} and returns @ref Containers::NullOpt. * @relativeref{Magnum,Error} and returns
* @relativeref{Corrade,Containers::NullOpt}.
* @see @ref features(), @ref convertToData(Containers::ArrayView<const CompressedImageView3D>), * @see @ref features(), @ref convertToData(Containers::ArrayView<const CompressedImageView3D>),
* @ref convert(), @ref convertToFile() * @ref convert(), @ref convertToFile()
*/ */
@ -1215,7 +1226,8 @@ class MAGNUM_TRADE_EXPORT AbstractImageConverter: public PluginManager::Abstract
* layout flags. Note that certain converters may impose additional * layout flags. Note that certain converters may impose additional
* size and order restrictions on the images, see documentation of a * size and order restrictions on the images, see documentation of a
* particular plugin for more information. On failure prints a message * particular plugin for more information. On failure prints a message
* to @relativeref{Magnum,Error} and returns @ref Containers::NullOpt. * to @relativeref{Magnum,Error} and returns
* @relativeref{Corrade,Containers::NullOpt}.
* @see @ref features(), @ref convertToData(Containers::ArrayView<const ImageView1D>), * @see @ref features(), @ref convertToData(Containers::ArrayView<const ImageView1D>),
* @ref convert(), @ref convertToFile() * @ref convert(), @ref convertToFile()
*/ */
@ -1249,7 +1261,7 @@ class MAGNUM_TRADE_EXPORT AbstractImageConverter: public PluginManager::Abstract
* impose additional size and order restrictions on the images, see * impose additional size and order restrictions on the images, see
* documentation of a particular plugin for more information. On * documentation of a particular plugin for more information. On
* failure prints a message to @relativeref{Magnum,Error} and returns * failure prints a message to @relativeref{Magnum,Error} and returns
* @ref Containers::NullOpt. * @relativeref{Corrade,Containers::NullOpt}.
* @see @ref features(), @ref convertToData(Containers::ArrayView<const ImageView2D>), * @see @ref features(), @ref convertToData(Containers::ArrayView<const ImageView2D>),
* @ref convert(), @ref convertToFile() * @ref convert(), @ref convertToFile()
*/ */
@ -1282,7 +1294,7 @@ class MAGNUM_TRADE_EXPORT AbstractImageConverter: public PluginManager::Abstract
* impose additional size and order restrictions on the images, see * impose additional size and order restrictions on the images, see
* documentation of a particular plugin for more information. On * documentation of a particular plugin for more information. On
* failure prints a message to @relativeref{Magnum,Error} and returns * failure prints a message to @relativeref{Magnum,Error} and returns
* @ref Containers::NullOpt. * @relativeref{Corrade,Containers::NullOpt}.
* @see @ref features(), @ref convertToData(Containers::ArrayView<const ImageView3D>), * @see @ref features(), @ref convertToData(Containers::ArrayView<const ImageView3D>),
* @ref convert(), @ref convertToFile() * @ref convert(), @ref convertToFile()
*/ */

111
src/Magnum/Trade/AbstractImporter.h

@ -812,7 +812,8 @@ class MAGNUM_TRADE_EXPORT AbstractImporter: public PluginManager::AbstractManagi
* @param id Scene ID, from range [0, @ref sceneCount()). * @param id Scene ID, from range [0, @ref sceneCount()).
* *
* On failure prints a message to @relativeref{Magnum,Error} and * On failure prints a message to @relativeref{Magnum,Error} and
* returns @ref Containers::NullOpt. Expects that a file is opened. * returns @relativeref{Corrade,Containers::NullOpt}. Expects that a
* file is opened.
* @see @ref scene(Containers::StringView), @ref sceneName(), * @see @ref scene(Containers::StringView), @ref sceneName(),
* @ref objectName(), @ref sceneFieldName() * @ref objectName(), @ref sceneFieldName()
*/ */
@ -825,8 +826,8 @@ class MAGNUM_TRADE_EXPORT AbstractImporter: public PluginManager::AbstractManagi
* A convenience API combining @ref sceneForName() and * A convenience API combining @ref sceneForName() and
* @ref scene(UnsignedInt). If @ref sceneForName() returns @cpp -1 @ce, * @ref scene(UnsignedInt). If @ref sceneForName() returns @cpp -1 @ce,
* prints a message to @relativeref{Magnum,Error} and returns * prints a message to @relativeref{Magnum,Error} and returns
* @ref Containers::NullOpt, otherwise propagates the result from * @relativeref{Corrade,Containers::NullOpt}, otherwise propagates the
* @ref scene(UnsignedInt). Expects that a file is opened. * result from @ref scene(UnsignedInt). Expects that a file is opened.
*/ */
Containers::Optional<SceneData> scene(Containers::StringView name); Containers::Optional<SceneData> scene(Containers::StringView name);
@ -890,7 +891,8 @@ class MAGNUM_TRADE_EXPORT AbstractImporter: public PluginManager::AbstractManagi
* @param id Animation ID, from range [0, @ref animationCount()). * @param id Animation ID, from range [0, @ref animationCount()).
* *
* On failure prints a message to @relativeref{Magnum,Error} and * On failure prints a message to @relativeref{Magnum,Error} and
* returns @ref Containers::NullOpt. Expects that a file is opened. * returns @relativeref{Corrade,Containers::NullOpt}. Expects that a
* file is opened.
* @see @ref animation(Containers::StringView), @ref animationName(), * @see @ref animation(Containers::StringView), @ref animationName(),
* @ref animationTrackTargetName() * @ref animationTrackTargetName()
*/ */
@ -903,8 +905,9 @@ class MAGNUM_TRADE_EXPORT AbstractImporter: public PluginManager::AbstractManagi
* A convenience API combining @ref animationForName() and * A convenience API combining @ref animationForName() and
* @ref animation(UnsignedInt). If @ref animationForName() returns * @ref animation(UnsignedInt). If @ref animationForName() returns
* @cpp -1 @ce, prints a message to @relativeref{Magnum,Error} and * @cpp -1 @ce, prints a message to @relativeref{Magnum,Error} and
* returns @ref Containers::NullOpt, otherwise propagates the result * returns @relativeref{Corrade,Containers::NullOpt}, otherwise
* from @ref animation(UnsignedInt). Expects that a file is opened. * propagates the result from @ref animation(UnsignedInt). Expects that
* a file is opened.
*/ */
Containers::Optional<AnimationData> animation(Containers::StringView name); Containers::Optional<AnimationData> animation(Containers::StringView name);
@ -971,7 +974,8 @@ class MAGNUM_TRADE_EXPORT AbstractImporter: public PluginManager::AbstractManagi
* @param id Light ID, from range [0, @ref lightCount()). * @param id Light ID, from range [0, @ref lightCount()).
* *
* On failure prints a message to @relativeref{Magnum,Error} and * On failure prints a message to @relativeref{Magnum,Error} and
* returns @ref Containers::NullOpt. Expects that a file is opened. * returns @relativeref{Corrade,Containers::NullOpt}. Expects that a
* file is opened.
* @see @ref light(Containers::StringView) * @see @ref light(Containers::StringView)
*/ */
Containers::Optional<LightData> light(UnsignedInt id); Containers::Optional<LightData> light(UnsignedInt id);
@ -983,8 +987,8 @@ class MAGNUM_TRADE_EXPORT AbstractImporter: public PluginManager::AbstractManagi
* A convenience API combining @ref lightForName() and * A convenience API combining @ref lightForName() and
* @ref light(UnsignedInt). If @ref lightForName() returns @cpp -1 @ce, * @ref light(UnsignedInt). If @ref lightForName() returns @cpp -1 @ce,
* prints a message to @relativeref{Magnum,Error} and returns * prints a message to @relativeref{Magnum,Error} and returns
* @ref Containers::NullOpt, otherwise propagates the result from * @relativeref{Corrade,Containers::NullOpt}, otherwise propagates the
* @ref light(UnsignedInt). Expects that a file is opened. * result from @ref light(UnsignedInt). Expects that a file is opened.
*/ */
Containers::Optional<LightData> light(Containers::StringView name); Containers::Optional<LightData> light(Containers::StringView name);
@ -1020,7 +1024,8 @@ class MAGNUM_TRADE_EXPORT AbstractImporter: public PluginManager::AbstractManagi
* @param id Camera ID, from range [0, @ref cameraCount()). * @param id Camera ID, from range [0, @ref cameraCount()).
* *
* On failure prints a message to @relativeref{Magnum,Error} and * On failure prints a message to @relativeref{Magnum,Error} and
* returns @ref Containers::NullOpt. Expects that a file is opened. * returns @relativeref{Corrade,Containers::NullOpt}. Expects that a
* file is opened.
* @see @ref camera(Containers::StringView) * @see @ref camera(Containers::StringView)
*/ */
Containers::Optional<CameraData> camera(UnsignedInt id); Containers::Optional<CameraData> camera(UnsignedInt id);
@ -1032,8 +1037,9 @@ class MAGNUM_TRADE_EXPORT AbstractImporter: public PluginManager::AbstractManagi
* A convenience API combining @ref cameraForName() and * A convenience API combining @ref cameraForName() and
* @ref camera(UnsignedInt). If @ref cameraForName() returns * @ref camera(UnsignedInt). If @ref cameraForName() returns
* @cpp -1 @ce, prints a message to @relativeref{Magnum,Error} and * @cpp -1 @ce, prints a message to @relativeref{Magnum,Error} and
* returns @ref Containers::NullOpt, otherwise propagates the result * returns @relativeref{Corrade,Containers::NullOpt}, otherwise
* from @ref camera(UnsignedInt). Expects that a file is opened. * propagates the result from @ref camera(UnsignedInt). Expects that a
* file is opened.
*/ */
Containers::Optional<CameraData> camera(Containers::StringView name); Containers::Optional<CameraData> camera(Containers::StringView name);
@ -1205,7 +1211,8 @@ class MAGNUM_TRADE_EXPORT AbstractImporter: public PluginManager::AbstractManagi
* @m_since_latest * @m_since_latest
* *
* On failure prints a message to @relativeref{Magnum,Error} and * On failure prints a message to @relativeref{Magnum,Error} and
* returns @ref Containers::NullOpt. Expects that a file is opened. * returns @relativeref{Corrade,Containers::NullOpt}. Expects that a
* file is opened.
* @see @ref skin2D(Containers::StringView), @ref skin2DName() * @see @ref skin2D(Containers::StringView), @ref skin2DName()
*/ */
Containers::Optional<SkinData2D> skin2D(UnsignedInt id); Containers::Optional<SkinData2D> skin2D(UnsignedInt id);
@ -1217,8 +1224,9 @@ class MAGNUM_TRADE_EXPORT AbstractImporter: public PluginManager::AbstractManagi
* A convenience API combining @ref skin2DForName() and * A convenience API combining @ref skin2DForName() and
* @ref skin2D(UnsignedInt). If @ref skin2DForName() returns * @ref skin2D(UnsignedInt). If @ref skin2DForName() returns
* @cpp -1 @ce, prints a message to @relativeref{Magnum,Error} and * @cpp -1 @ce, prints a message to @relativeref{Magnum,Error} and
* returns @ref Containers::NullOpt, otherwise propagates the result * returns @relativeref{Corrade,Containers::NullOpt}, otherwise
* from @ref skin2D(UnsignedInt). Expects that a file is opened. * propagates the result from @ref skin2D(UnsignedInt). Expects that a
* file is opened.
*/ */
Containers::Optional<SkinData2D> skin2D(Containers::StringView name); Containers::Optional<SkinData2D> skin2D(Containers::StringView name);
@ -1258,7 +1266,8 @@ class MAGNUM_TRADE_EXPORT AbstractImporter: public PluginManager::AbstractManagi
* @m_since_latest * @m_since_latest
* *
* On failure prints a message to @relativeref{Magnum,Error} and * On failure prints a message to @relativeref{Magnum,Error} and
* returns @ref Containers::NullOpt. Expects that a file is opened. * returns @relativeref{Corrade,Containers::NullOpt}. Expects that a
* file is opened.
* @see @ref skin3D(Containers::StringView), @ref skin3DName() * @see @ref skin3D(Containers::StringView), @ref skin3DName()
*/ */
Containers::Optional<SkinData3D> skin3D(UnsignedInt id); Containers::Optional<SkinData3D> skin3D(UnsignedInt id);
@ -1270,8 +1279,9 @@ class MAGNUM_TRADE_EXPORT AbstractImporter: public PluginManager::AbstractManagi
* A convenience API combining @ref skin3DForName() and * A convenience API combining @ref skin3DForName() and
* @ref skin3D(UnsignedInt). If @ref skin3DForName() returns * @ref skin3D(UnsignedInt). If @ref skin3DForName() returns
* @cpp -1 @ce, prints a message to @relativeref{Magnum,Error} and * @cpp -1 @ce, prints a message to @relativeref{Magnum,Error} and
* returns @ref Containers::NullOpt, otherwise propagates the result * returns @relativeref{Corrade,Containers::NullOpt}, otherwise
* from @ref skin3D(UnsignedInt). Expects that a file is opened. * propagates the result from @ref skin3D(UnsignedInt). Expects that a
* file is opened.
*/ */
Containers::Optional<SkinData3D> skin3D(Containers::StringView name); Containers::Optional<SkinData3D> skin3D(Containers::StringView name);
@ -1323,10 +1333,10 @@ class MAGNUM_TRADE_EXPORT AbstractImporter: public PluginManager::AbstractManagi
* @m_since{2020,06} * @m_since{2020,06}
* *
* On failure prints a message to @relativeref{Magnum,Error} and * On failure prints a message to @relativeref{Magnum,Error} and
* returns @ref Containers::NullOpt. The @p level parameter allows * returns @relativeref{Corrade,Containers::NullOpt}. The @p level
* access to additional data and is largely left as importer-specific * parameter allows access to additional data and is largely left as
* --- for example allowing access to per-instance, per-face or * importer-specific --- for example allowing access to per-instance,
* per-edge data. Expects that a file is opened. * per-face or per-edge data. Expects that a file is opened.
* @see @ref mesh(Containers::StringView, UnsignedInt), * @see @ref mesh(Containers::StringView, UnsignedInt),
* @ref MeshPrimitive::Instances, @ref MeshPrimitive::Faces, * @ref MeshPrimitive::Instances, @ref MeshPrimitive::Faces,
* @ref MeshPrimitive::Edges, @ref meshName(), * @ref MeshPrimitive::Edges, @ref meshName(),
@ -1341,9 +1351,9 @@ class MAGNUM_TRADE_EXPORT AbstractImporter: public PluginManager::AbstractManagi
* A convenience API combining @ref meshForName() and * A convenience API combining @ref meshForName() and
* @ref mesh(UnsignedInt, UnsignedInt). If @ref meshForName() returns * @ref mesh(UnsignedInt, UnsignedInt). If @ref meshForName() returns
* @cpp -1 @ce, prints a message to @relativeref{Magnum,Error} and * @cpp -1 @ce, prints a message to @relativeref{Magnum,Error} and
* returns @ref Containers::NullOpt, otherwise propagates the result * returns @relativeref{Corrade,Containers::NullOpt}, otherwise
* from @ref mesh(UnsignedInt, UnsignedInt). Expects that a file is * propagates the result from @ref mesh(UnsignedInt, UnsignedInt).
* opened. * Expects that a file is opened.
*/ */
Containers::Optional<MeshData> mesh(Containers::StringView name, UnsignedInt level = 0); Containers::Optional<MeshData> mesh(Containers::StringView name, UnsignedInt level = 0);
@ -1408,8 +1418,8 @@ class MAGNUM_TRADE_EXPORT AbstractImporter: public PluginManager::AbstractManagi
* @brief Two-dimensional mesh * @brief Two-dimensional mesh
* @param id Mesh ID, from range [0, @ref mesh2DCount()). * @param id Mesh ID, from range [0, @ref mesh2DCount()).
* *
* Returns given mesh or @ref Containers::NullOpt if importing failed. * Returns given mesh or @relativeref{Corrade,Containers::NullOpt} if
* Expects that a file is opened. * importing failed. Expects that a file is opened.
* @m_deprecated_since{2020,06} Use @ref mesh() instead. * @m_deprecated_since{2020,06} Use @ref mesh() instead.
*/ */
CORRADE_IGNORE_DEPRECATED_PUSH /* Clang doesn't warn, but GCC does */ CORRADE_IGNORE_DEPRECATED_PUSH /* Clang doesn't warn, but GCC does */
@ -1448,8 +1458,8 @@ class MAGNUM_TRADE_EXPORT AbstractImporter: public PluginManager::AbstractManagi
* @brief Three-dimensional mesh * @brief Three-dimensional mesh
* @param id Mesh ID, from range [0, @ref mesh3DCount()). * @param id Mesh ID, from range [0, @ref mesh3DCount()).
* *
* Returns given mesh or @ref Containers::NullOpt if importing failed. * Returns given mesh or @relativeref{Corrade,Containers::NullOpt} if
* Expects that a file is opened. * importing failed. Expects that a file is opened.
* @m_deprecated_since{2020,06} Use @ref meshName() instead. * @m_deprecated_since{2020,06} Use @ref meshName() instead.
*/ */
CORRADE_IGNORE_DEPRECATED_PUSH /* Clang doesn't warn, but GCC does */ CORRADE_IGNORE_DEPRECATED_PUSH /* Clang doesn't warn, but GCC does */
@ -1489,7 +1499,8 @@ class MAGNUM_TRADE_EXPORT AbstractImporter: public PluginManager::AbstractManagi
* @param id Material ID, from range [0, @ref materialCount()). * @param id Material ID, from range [0, @ref materialCount()).
* *
* On failure prints a message to @relativeref{Magnum,Error} and * On failure prints a message to @relativeref{Magnum,Error} and
* returns @ref Containers::NullOpt. Expects that a file is opened. * returns @relativeref{Corrade,Containers::NullOpt}. Expects that a
* file is opened.
* @see @ref material(Containers::StringView), @ref materialName() * @see @ref material(Containers::StringView), @ref materialName()
*/ */
#if !defined(MAGNUM_BUILD_DEPRECATED) || defined(DOXYGEN_GENERATING_OUTPUT) #if !defined(MAGNUM_BUILD_DEPRECATED) || defined(DOXYGEN_GENERATING_OUTPUT)
@ -1506,8 +1517,9 @@ class MAGNUM_TRADE_EXPORT AbstractImporter: public PluginManager::AbstractManagi
* A convenience API combining @ref materialForName() and * A convenience API combining @ref materialForName() and
* @ref material(UnsignedInt). If @ref materialForName() returns * @ref material(UnsignedInt). If @ref materialForName() returns
* @cpp -1 @ce, prints a message to @relativeref{Magnum,Error} and * @cpp -1 @ce, prints a message to @relativeref{Magnum,Error} and
* returns @ref Containers::NullOpt, otherwise propagates the result * returns @relativeref{Corrade,Containers::NullOpt}, otherwise
* from @ref material(UnsignedInt). Expects that a file is opened. * propagates the result from @ref material(UnsignedInt). Expects that
* a file is opened.
*/ */
#if !defined(MAGNUM_BUILD_DEPRECATED) || defined(DOXYGEN_GENERATING_OUTPUT) #if !defined(MAGNUM_BUILD_DEPRECATED) || defined(DOXYGEN_GENERATING_OUTPUT)
Containers::Optional<MaterialData> Containers::Optional<MaterialData>
@ -1548,7 +1560,8 @@ class MAGNUM_TRADE_EXPORT AbstractImporter: public PluginManager::AbstractManagi
* @param id Texture ID, from range [0, @ref textureCount()). * @param id Texture ID, from range [0, @ref textureCount()).
* *
* On failure prints a message to @relativeref{Magnum,Error} and * On failure prints a message to @relativeref{Magnum,Error} and
* returns @ref Containers::NullOpt. Expects that a file is opened. * returns @relativeref{Corrade,Containers::NullOpt}. Expects that a
* file is opened.
* @see @ref texture(Containers::StringView), @ref textureName() * @see @ref texture(Containers::StringView), @ref textureName()
*/ */
Containers::Optional<TextureData> texture(UnsignedInt id); Containers::Optional<TextureData> texture(UnsignedInt id);
@ -1560,8 +1573,9 @@ class MAGNUM_TRADE_EXPORT AbstractImporter: public PluginManager::AbstractManagi
* A convenience API combining @ref textureForName() and * A convenience API combining @ref textureForName() and
* @ref texture(UnsignedInt). If @ref textureForName() returns * @ref texture(UnsignedInt). If @ref textureForName() returns
* @cpp -1 @ce, prints a message to @relativeref{Magnum,Error} and * @cpp -1 @ce, prints a message to @relativeref{Magnum,Error} and
* returns @ref Containers::NullOpt, otherwise propagates the result * returns @relativeref{Corrade,Containers::NullOpt}, otherwise
* from @ref texture(UnsignedInt). Expects that a file is opened. * propagates the result from @ref texture(UnsignedInt). Expects that a
* file is opened.
*/ */
Containers::Optional<TextureData> texture(Containers::StringView name); Containers::Optional<TextureData> texture(Containers::StringView name);
@ -1609,7 +1623,8 @@ class MAGNUM_TRADE_EXPORT AbstractImporter: public PluginManager::AbstractManagi
* @param level Mip level, from range [0, @ref image1DLevelCount()) * @param level Mip level, from range [0, @ref image1DLevelCount())
* *
* On failure prints a message to @relativeref{Magnum,Error} and * On failure prints a message to @relativeref{Magnum,Error} and
* returns @ref Containers::NullOpt. Expects that a file is opened. * returns @relativeref{Corrade,Containers::NullOpt}. Expects that a
* file is opened.
* @see @ref image1D(Containers::StringView, UnsignedInt), * @see @ref image1D(Containers::StringView, UnsignedInt),
* @ref image1DName() * @ref image1DName()
*/ */
@ -1622,9 +1637,9 @@ class MAGNUM_TRADE_EXPORT AbstractImporter: public PluginManager::AbstractManagi
* A convenience API combining @ref image1DForName() and * A convenience API combining @ref image1DForName() and
* @ref image1D(UnsignedInt, UnsignedInt). If @ref image1DForName() * @ref image1D(UnsignedInt, UnsignedInt). If @ref image1DForName()
* returns @cpp -1 @ce, prints a message to @relativeref{Magnum,Error} * returns @cpp -1 @ce, prints a message to @relativeref{Magnum,Error}
* and returns @ref Containers::NullOpt, otherwise propagates the * and returns @relativeref{Corrade,Containers::NullOpt}, otherwise
* result from @ref image1D(UnsignedInt, UnsignedInt). Expects that a * propagates the result from @ref image1D(UnsignedInt, UnsignedInt).
* file is opened. * Expects that a file is opened.
*/ */
Containers::Optional<ImageData1D> image1D(Containers::StringView name, UnsignedInt level = 0); Containers::Optional<ImageData1D> image1D(Containers::StringView name, UnsignedInt level = 0);
@ -1672,7 +1687,8 @@ class MAGNUM_TRADE_EXPORT AbstractImporter: public PluginManager::AbstractManagi
* @param level Mip level, from range [0, @ref image2DLevelCount()) * @param level Mip level, from range [0, @ref image2DLevelCount())
* *
* On failure prints a message to @relativeref{Magnum,Error} and * On failure prints a message to @relativeref{Magnum,Error} and
* returns @ref Containers::NullOpt. Expects that a file is opened. * returns @relativeref{Corrade,Containers::NullOpt}. Expects that a
* file is opened.
* @see @ref image2D(Containers::StringView, UnsignedInt), * @see @ref image2D(Containers::StringView, UnsignedInt),
* @ref image2DName() * @ref image2DName()
*/ */
@ -1685,9 +1701,9 @@ class MAGNUM_TRADE_EXPORT AbstractImporter: public PluginManager::AbstractManagi
* A convenience API combining @ref image2DForName() and * A convenience API combining @ref image2DForName() and
* @ref image2D(UnsignedInt, UnsignedInt). If @ref image2DForName() * @ref image2D(UnsignedInt, UnsignedInt). If @ref image2DForName()
* returns @cpp -1 @ce, prints a message to @relativeref{Magnum,Error} * returns @cpp -1 @ce, prints a message to @relativeref{Magnum,Error}
* and returns @ref Containers::NullOpt, otherwise propagates the * and returns @relativeref{Corrade,Containers::NullOpt}, otherwise
* result from @ref image2D(UnsignedInt, UnsignedInt). Expects that a * propagates the result from @ref image2D(UnsignedInt, UnsignedInt).
* file is opened. * Expects that a file is opened.
*/ */
Containers::Optional<ImageData2D> image2D(Containers::StringView name, UnsignedInt level = 0); Containers::Optional<ImageData2D> image2D(Containers::StringView name, UnsignedInt level = 0);
@ -1735,7 +1751,8 @@ class MAGNUM_TRADE_EXPORT AbstractImporter: public PluginManager::AbstractManagi
* @param level Mip level, from range [0, @ref image3DLevelCount()) * @param level Mip level, from range [0, @ref image3DLevelCount())
* *
* On failure prints a message to @relativeref{Magnum,Error} and * On failure prints a message to @relativeref{Magnum,Error} and
* returns @ref Containers::NullOpt. Expects that a file is opened. * returns @relativeref{Corrade,Containers::NullOpt}. Expects that a
* file is opened.
* @see @ref image3D(Containers::StringView, UnsignedInt), * @see @ref image3D(Containers::StringView, UnsignedInt),
* @ref image3DName() * @ref image3DName()
*/ */
@ -1748,9 +1765,9 @@ class MAGNUM_TRADE_EXPORT AbstractImporter: public PluginManager::AbstractManagi
* A convenience API combining @ref image3DForName() and * A convenience API combining @ref image3DForName() and
* @ref image3D(UnsignedInt, UnsignedInt). If @ref image3DForName() * @ref image3D(UnsignedInt, UnsignedInt). If @ref image3DForName()
* returns @cpp -1 @ce, prints a message to @relativeref{Magnum,Error} * returns @cpp -1 @ce, prints a message to @relativeref{Magnum,Error}
* and returns @ref Containers::NullOpt, otherwise propagates the * and returns @relativeref{Corrade,Containers::NullOpt}, otherwise
* result from @ref image3D(UnsignedInt, UnsignedInt). Expects that a * propagates the result from @ref image3D(UnsignedInt, UnsignedInt).
* file is opened. * Expects that a file is opened.
*/ */
Containers::Optional<ImageData3D> image3D(Containers::StringView name, UnsignedInt level = 0); Containers::Optional<ImageData3D> image3D(Containers::StringView name, UnsignedInt level = 0);

95
src/Magnum/Trade/AbstractSceneConverter.h

@ -911,7 +911,7 @@ class MAGNUM_TRADE_EXPORT AbstractSceneConverter: public PluginManager::Abstract
* *
* If a (batch) conversion is currently in progress, calls @ref abort() * If a (batch) conversion is currently in progress, calls @ref abort()
* first. On failure prints a message to @relativeref{Magnum,Error} and * first. On failure prints a message to @relativeref{Magnum,Error} and
* returns @ref Containers::NullOpt. * returns @relativeref{Corrade,Containers::NullOpt}.
* *
* Expects that @ref SceneConverterFeature::ConvertMesh is supported. * Expects that @ref SceneConverterFeature::ConvertMesh is supported.
* If @ref SceneConverterFeature::AddMeshes is supported instead, you * If @ref SceneConverterFeature::AddMeshes is supported instead, you
@ -943,7 +943,7 @@ class MAGNUM_TRADE_EXPORT AbstractSceneConverter: public PluginManager::Abstract
* *
* If (batch) conversion is currently in progress, calls @ref abort() * If (batch) conversion is currently in progress, calls @ref abort()
* first. On failure prints a message to @relativeref{Magnum,Error} and * first. On failure prints a message to @relativeref{Magnum,Error} and
* returns @ref Containers::NullOpt. * returns @relativeref{Corrade,Containers::NullOpt}.
* *
* Expects that @ref SceneConverterFeature::ConvertMeshToData is * Expects that @ref SceneConverterFeature::ConvertMeshToData is
* supported. If not and both * supported. If not and both
@ -1092,7 +1092,7 @@ class MAGNUM_TRADE_EXPORT AbstractSceneConverter: public PluginManager::Abstract
* *
* Expects that @ref beginData() was called before. On failure prints a * Expects that @ref beginData() was called before. On failure prints a
* message to @relativeref{Magnum,Error} and returns * message to @relativeref{Magnum,Error} and returns
* @ref Containers::NullOpt. * @relativeref{Corrade,Containers::NullOpt}.
* *
* If @ref SceneConverterFeature::ConvertMultipleToData is not * If @ref SceneConverterFeature::ConvertMultipleToData is not
* supported and @ref SceneConverterFeature::ConvertMeshToData is * supported and @ref SceneConverterFeature::ConvertMeshToData is
@ -1100,7 +1100,7 @@ class MAGNUM_TRADE_EXPORT AbstractSceneConverter: public PluginManager::Abstract
* @ref add(const MeshData&, Containers::StringView) call, which * @ref add(const MeshData&, Containers::StringView) call, which
* delegated to @ref convertToData(const MeshData&). If no mesh was * delegated to @ref convertToData(const MeshData&). If no mesh was
* added, prints a message to @relativeref{Magnum,Error} and returns * added, prints a message to @relativeref{Magnum,Error} and returns
* @ref Containers::NullOpt. * @relativeref{Corrade,Containers::NullOpt}.
*/ */
Containers::Optional<Containers::Array<char>> endData(); Containers::Optional<Containers::Array<char>> endData();
@ -1165,8 +1165,9 @@ class MAGNUM_TRADE_EXPORT AbstractSceneConverter: public PluginManager::Abstract
* is implicitly equal to @ref sceneCount() before calling this * is implicitly equal to @ref sceneCount() before calling this
* function and can be subsequently used in functions like * function and can be subsequently used in functions like
* @ref setDefaultScene(). On failure prints a message to * @ref setDefaultScene(). On failure prints a message to
* @relativeref{Magnum,Error} and returns @ref Containers::NullOpt --- * @relativeref{Magnum,Error} and returns
* the count of added animations doesn't change in that case. * @relativeref{Corrade,Containers::NullOpt} --- the count of added
* animations doesn't change in that case.
* *
* If the converter doesn't support scene naming, @p name is ignored. * If the converter doesn't support scene naming, @p name is ignored.
* *
@ -1249,8 +1250,8 @@ class MAGNUM_TRADE_EXPORT AbstractSceneConverter: public PluginManager::Abstract
* @ref SceneConverterFeature::AddAnimations is supported. The returned * @ref SceneConverterFeature::AddAnimations is supported. The returned
* ID is implicitly equal to @ref animationCount() before calling this * ID is implicitly equal to @ref animationCount() before calling this
* function. On failure prints a message to @relativeref{Magnum,Error} * function. On failure prints a message to @relativeref{Magnum,Error}
* and returns @ref Containers::NullOpt --- the count of added * and returns @relativeref{Corrade,Containers::NullOpt} --- the count
* animations doesn't change in that case. * of added animations doesn't change in that case.
* *
* If the converter doesn't support animation naming, @p name is * If the converter doesn't support animation naming, @p name is
* ignored. * ignored.
@ -1305,8 +1306,8 @@ class MAGNUM_TRADE_EXPORT AbstractSceneConverter: public PluginManager::Abstract
* light from a @ref SceneData passed to * light from a @ref SceneData passed to
* @ref add(const SceneData&, Containers::StringView). On failure * @ref add(const SceneData&, Containers::StringView). On failure
* prints a message to @relativeref{Magnum,Error} and returns * prints a message to @relativeref{Magnum,Error} and returns
* @ref Containers::NullOpt --- the count of added lights doesn't * @relativeref{Corrade,Containers::NullOpt} --- the count of added
* change in that case. * lights doesn't change in that case.
* *
* If the converter doesn't support light naming, @p name is ignored. * If the converter doesn't support light naming, @p name is ignored.
* @see @ref isConverting(), @ref features() * @see @ref isConverting(), @ref features()
@ -1343,8 +1344,8 @@ class MAGNUM_TRADE_EXPORT AbstractSceneConverter: public PluginManager::Abstract
* camera from a @ref SceneData passed to * camera from a @ref SceneData passed to
* @ref add(const SceneData&, Containers::StringView). On failure * @ref add(const SceneData&, Containers::StringView). On failure
* prints a message to @relativeref{Magnum,Error} and returns * prints a message to @relativeref{Magnum,Error} and returns
* @ref Containers::NullOpt --- the count of added cameras doesn't * @relativeref{Corrade,Containers::NullOpt} --- the count of added
* change in that case. * cameras doesn't change in that case.
* *
* If the converter doesn't support camera naming, @p name is ignored. * If the converter doesn't support camera naming, @p name is ignored.
* @see @ref isConverting(), @ref features() * @see @ref isConverting(), @ref features()
@ -1378,8 +1379,8 @@ class MAGNUM_TRADE_EXPORT AbstractSceneConverter: public PluginManager::Abstract
* @ref SceneConverterFeature::AddSkins2D is supported. The returned ID * @ref SceneConverterFeature::AddSkins2D is supported. The returned ID
* is implicitly equal to @ref skin2DCount() before calling this * is implicitly equal to @ref skin2DCount() before calling this
* function. On failure prints a message to @relativeref{Magnum,Error} * function. On failure prints a message to @relativeref{Magnum,Error}
* and returns @ref Containers::NullOpt --- the count of added skins * and returns @relativeref{Corrade,Containers::NullOpt} --- the count
* doesn't change in that case. * of added skins doesn't change in that case.
* *
* If the converter doesn't support skin naming, @p name is ignored. * If the converter doesn't support skin naming, @p name is ignored.
* @see @ref isConverting(), @ref features() * @see @ref isConverting(), @ref features()
@ -1413,8 +1414,8 @@ class MAGNUM_TRADE_EXPORT AbstractSceneConverter: public PluginManager::Abstract
* @ref SceneConverterFeature::AddSkins3D is supported. The returned ID * @ref SceneConverterFeature::AddSkins3D is supported. The returned ID
* is implicitly equal to @ref skin3DCount() before calling this * is implicitly equal to @ref skin3DCount() before calling this
* function. On failure prints a message to @relativeref{Magnum,Error} * function. On failure prints a message to @relativeref{Magnum,Error}
* and returns @ref Containers::NullOpt --- the count of added skins * and returns @relativeref{Corrade,Containers::NullOpt} --- the count
* doesn't change in that case. * of added skins doesn't change in that case.
* *
* If the converter doesn't support skin naming, @p name is ignored. * If the converter doesn't support skin naming, @p name is ignored.
* @see @ref isConverting(), @ref features() * @see @ref isConverting(), @ref features()
@ -1459,8 +1460,8 @@ class MAGNUM_TRADE_EXPORT AbstractSceneConverter: public PluginManager::Abstract
* example reference a mesh from a @ref SceneData passed to * example reference a mesh from a @ref SceneData passed to
* @ref add(const SceneData&, Containers::StringView). On failure * @ref add(const SceneData&, Containers::StringView). On failure
* prints a message to @relativeref{Magnum,Error} and returns * prints a message to @relativeref{Magnum,Error} and returns
* @ref Containers::NullOpt --- the count of added meshes doesn't * @relativeref{Corrade,Containers::NullOpt} --- the count of added
* change in that case. * meshes doesn't change in that case.
* *
* If the converter doesn't support mesh naming, @p name is ignored. * If the converter doesn't support mesh naming, @p name is ignored.
* *
@ -1495,8 +1496,9 @@ class MAGNUM_TRADE_EXPORT AbstractSceneConverter: public PluginManager::Abstract
* a mesh from a @ref SceneData passed to * a mesh from a @ref SceneData passed to
* @ref add(const SceneData&, Containers::StringView); all levels * @ref add(const SceneData&, Containers::StringView); all levels
* together are treated as a single mesh. On failure prints a message * together are treated as a single mesh. On failure prints a message
* to @relativeref{Magnum,Error} and returns @ref Containers::NullOpt * to @relativeref{Magnum,Error} and returns
* --- the count of added meshes doesn't change in that case. * @relativeref{Corrade,Containers::NullOpt} --- the count of added
* meshes doesn't change in that case.
* *
* If the converter doesn't support mesh naming, @p name is ignored. * If the converter doesn't support mesh naming, @p name is ignored.
* @see @ref isConverting(), @ref features(), * @see @ref isConverting(), @ref features(),
@ -1554,8 +1556,8 @@ class MAGNUM_TRADE_EXPORT AbstractSceneConverter: public PluginManager::Abstract
* material from a @ref SceneData passed to * material from a @ref SceneData passed to
* @ref add(const SceneData&, Containers::StringView). On failure * @ref add(const SceneData&, Containers::StringView). On failure
* prints a message to @relativeref{Magnum,Error} and returns * prints a message to @relativeref{Magnum,Error} and returns
* @ref Containers::NullOpt --- the count of added materials doesn't * @relativeref{Corrade,Containers::NullOpt} --- the count of added
* change in that case. * materials doesn't change in that case.
* *
* If the converter doesn't support material naming, @p name is * If the converter doesn't support material naming, @p name is
* ignored. * ignored.
@ -1600,8 +1602,8 @@ class MAGNUM_TRADE_EXPORT AbstractSceneConverter: public PluginManager::Abstract
* texture from a @ref MaterialData passed to * texture from a @ref MaterialData passed to
* @ref add(const MaterialData&, Containers::StringView). On failure * @ref add(const MaterialData&, Containers::StringView). On failure
* prints a message to @relativeref{Magnum,Error} and returns * prints a message to @relativeref{Magnum,Error} and returns
* @ref Containers::NullOpt --- the count of added textures doesn't * @relativeref{Corrade,Containers::NullOpt} --- the count of added
* change in that case. * textures doesn't change in that case.
* *
* If the converter doesn't support texture naming, @p name is ignored. * If the converter doesn't support texture naming, @p name is ignored.
* *
@ -1649,8 +1651,8 @@ class MAGNUM_TRADE_EXPORT AbstractSceneConverter: public PluginManager::Abstract
* reference an image from a @ref TextureData passed to * reference an image from a @ref TextureData passed to
* @ref add(const TextureData&, Containers::StringView). On failure * @ref add(const TextureData&, Containers::StringView). On failure
* prints a message to @relativeref{Magnum,Error} and returns * prints a message to @relativeref{Magnum,Error} and returns
* @ref Containers::NullOpt --- the count of added images doesn't * @relativeref{Corrade,Containers::NullOpt} --- the count of added
* change in that case. * images doesn't change in that case.
* *
* If the converter doesn't support image naming, @p name is ignored. * If the converter doesn't support image naming, @p name is ignored.
* @see @ref isConverting(), @ref features(), * @see @ref isConverting(), @ref features(),
@ -1703,8 +1705,9 @@ class MAGNUM_TRADE_EXPORT AbstractSceneConverter: public PluginManager::Abstract
* reference an image from a @ref TextureData passed to * reference an image from a @ref TextureData passed to
* @ref add(const TextureData&, Containers::StringView); all levels * @ref add(const TextureData&, Containers::StringView); all levels
* together are treated as a single image. On failure prints a message * together are treated as a single image. On failure prints a message
* to @relativeref{Magnum,Error} and returns @ref Containers::NullOpt * to @relativeref{Magnum,Error} and returns
* --- the count of added images doesn't change in that case. * @relativeref{Corrade,Containers::NullOpt} --- the count of added
* images doesn't change in that case.
* *
* If the converter doesn't support image naming, @p name is ignored. * If the converter doesn't support image naming, @p name is ignored.
* @see @ref isConverting(), @ref features(), * @see @ref isConverting(), @ref features(),
@ -1781,8 +1784,8 @@ class MAGNUM_TRADE_EXPORT AbstractSceneConverter: public PluginManager::Abstract
* reference an image from a @ref TextureData passed to * reference an image from a @ref TextureData passed to
* @ref add(const TextureData&, Containers::StringView). On failure * @ref add(const TextureData&, Containers::StringView). On failure
* prints a message to @relativeref{Magnum,Error} and returns * prints a message to @relativeref{Magnum,Error} and returns
* @ref Containers::NullOpt --- the count of added images doesn't * @relativeref{Corrade,Containers::NullOpt} --- the count of added
* change in that case. * images doesn't change in that case.
* *
* If the converter doesn't support image naming, @p name is ignored. * If the converter doesn't support image naming, @p name is ignored.
* @see @ref isConverting(), @ref features(), * @see @ref isConverting(), @ref features(),
@ -1835,8 +1838,9 @@ class MAGNUM_TRADE_EXPORT AbstractSceneConverter: public PluginManager::Abstract
* reference an image from a @ref TextureData passed to * reference an image from a @ref TextureData passed to
* @ref add(const TextureData&, Containers::StringView); all levels * @ref add(const TextureData&, Containers::StringView); all levels
* together are treated as a single image. On failure prints a message * together are treated as a single image. On failure prints a message
* to @relativeref{Magnum,Error} and returns @ref Containers::NullOpt * to @relativeref{Magnum,Error} and returns
* --- the count of added images doesn't change in that case. * @relativeref{Corrade,Containers::NullOpt} --- the count of added
* images doesn't change in that case.
* *
* If the converter doesn't support image naming, @p name is ignored. * If the converter doesn't support image naming, @p name is ignored.
* @see @ref isConverting(), @ref features() * @see @ref isConverting(), @ref features()
@ -1912,8 +1916,8 @@ class MAGNUM_TRADE_EXPORT AbstractSceneConverter: public PluginManager::Abstract
* reference an image from a @ref TextureData passed to * reference an image from a @ref TextureData passed to
* @ref add(const TextureData&, Containers::StringView). On failure * @ref add(const TextureData&, Containers::StringView). On failure
* prints a message to @relativeref{Magnum,Error} and returns * prints a message to @relativeref{Magnum,Error} and returns
* @ref Containers::NullOpt --- the count of added images doesn't * @relativeref{Corrade,Containers::NullOpt} --- the count of added
* change in that case. * images doesn't change in that case.
* *
* If the converter doesn't support image naming, @p name is ignored. * If the converter doesn't support image naming, @p name is ignored.
* @see @ref isConverting(), @ref features(), * @see @ref isConverting(), @ref features(),
@ -1966,8 +1970,9 @@ class MAGNUM_TRADE_EXPORT AbstractSceneConverter: public PluginManager::Abstract
* reference an image from a @ref TextureData passed to * reference an image from a @ref TextureData passed to
* @ref add(const TextureData&, Containers::StringView); all levels * @ref add(const TextureData&, Containers::StringView); all levels
* together are treated as a single image. On failure prints a message * together are treated as a single image. On failure prints a message
* to @relativeref{Magnum,Error} and returns @ref Containers::NullOpt * to @relativeref{Magnum,Error} and returns
* --- the count of added images doesn't change in that case. * @relativeref{Corrade,Containers::NullOpt} --- the count of added
* images doesn't change in that case.
* *
* If the converter doesn't support image naming, @p name is ignored. * If the converter doesn't support image naming, @p name is ignored.
* @see @ref isConverting(), @ref features() * @see @ref isConverting(), @ref features()
@ -2096,8 +2101,8 @@ class MAGNUM_TRADE_EXPORT AbstractSceneConverter: public PluginManager::Abstract
* and @ref SceneConverterFeature::AddMeshes is supported, default * and @ref SceneConverterFeature::AddMeshes is supported, default
* implementation calls @ref beginData(), * implementation calls @ref beginData(),
* @ref add(const MeshData&, Containers::StringView) and returns the * @ref add(const MeshData&, Containers::StringView) and returns the
* output of @ref endData(), or @ref Containers::NullOpt if any of * output of @ref endData(), or @relativeref{Corrade,Containers::NullOpt}
* those failed. * if any of those failed.
*/ */
virtual bool doConvertToFile(const MeshData& mesh, Containers::StringView filename); virtual bool doConvertToFile(const MeshData& mesh, Containers::StringView filename);
@ -2176,8 +2181,8 @@ class MAGNUM_TRADE_EXPORT AbstractSceneConverter: public PluginManager::Abstract
* @ref SceneConverterFeature::AddMeshes is supported, default * @ref SceneConverterFeature::AddMeshes is supported, default
* implementation calls @ref beginData(), * implementation calls @ref beginData(),
* @ref add(const MeshData&, Containers::StringView) and returns the * @ref add(const MeshData&, Containers::StringView) and returns the
* output of @ref endData(), or @ref Containers::NullOpt if any of * output of @ref endData(), or @relativeref{Corrade,Containers::NullOpt}
* those failed. * if any of those failed.
*/ */
virtual Containers::Optional<Containers::Array<char>> doConvertToData(const MeshData& mesh); virtual Containers::Optional<Containers::Array<char>> doConvertToData(const MeshData& mesh);
@ -2328,11 +2333,11 @@ class MAGNUM_TRADE_EXPORT AbstractSceneConverter: public PluginManager::Abstract
* fails, returns @cpp false @ce and the subsequent @ref doEnd(), * fails, returns @cpp false @ce and the subsequent @ref doEnd(),
* @ref doEndData() or @ref doEndFile() call prints a message to * @ref doEndData() or @ref doEndFile() call prints a message to
* @relativeref{Magnum,Error} and returns a @cpp nullptr @ce, * @relativeref{Magnum,Error} and returns a @cpp nullptr @ce,
* @ref Containers::NullOpt or @cpp false @ce. Since the delegation * @relativeref{Corrade,Containers::NullOpt} or @cpp false @ce. Since
* operates just on a single mesh at a time, if this function is called * the delegation operates just on a single mesh at a time, if this
* more than once after a @ref begin(), @ref beginData() or * function is called more than once after a @ref begin(),
* @ref beginFile(), prints a message to @relativeref{Magnum,Error} and * @ref beginData() or @ref beginFile(), prints a message to
* returns @cpp false @ce. * @relativeref{Magnum,Error} and returns @cpp false @ce.
*/ */
virtual bool doAdd(UnsignedInt id, const MeshData& mesh, Containers::StringView name); virtual bool doAdd(UnsignedInt id, const MeshData& mesh, Containers::StringView name);

71
src/Magnum/Trade/MaterialData.h

@ -1502,12 +1502,12 @@ class MAGNUM_TRADE_EXPORT MaterialAttributeData {
* *pointer to a pointer*, not the pointer value itself. * *pointer to a pointer*, not the pointer value itself.
* *
* In case @p type is @ref MaterialAttributeType::String, @p value is * In case @p type is @ref MaterialAttributeType::String, @p value is
* expected to point to a @ref Containers::StringView. The combined * expected to point to a @relativeref{Corrade,Containers::StringView}.
* length of @p name and @p value strings is expected to fit into 60 * The combined length of @p name and @p value strings is expected to
* bytes. In case @p type is @ref MaterialAttributeType::Buffer, * fit into 60 bytes. In case @p type is
* @p value is expected to point to a * @ref MaterialAttributeType::Buffer, @p value is expected to point to
* @relativeref{Corrade,Containers::ArrayView}. The combined length of * a @relativeref{Corrade,Containers::ArrayView}. The combined length
* @p name and @p value views is expected to fit into 61 bytes. * of @p name and @p value views is expected to fit into 61 bytes.
*/ */
/*implicit*/ MaterialAttributeData(Containers::StringView name, MaterialAttributeType type, const void* value) noexcept; /*implicit*/ MaterialAttributeData(Containers::StringView name, MaterialAttributeType type, const void* value) noexcept;
@ -1555,9 +1555,9 @@ class MAGNUM_TRADE_EXPORT MaterialAttributeData {
* *
* In case of a @ref MaterialAttributeType::String, returns a * In case of a @ref MaterialAttributeType::String, returns a
* null-terminated @cpp const char* @ce (not a pointer to * null-terminated @cpp const char* @ce (not a pointer to
* @ref Containers::StringView). This doesn't preserve the actual * @relativeref{Corrade,Containers::StringView}). This doesn't preserve
* string size in case the string data contain @cpp '\0' @ce bytes, * the actual string size in case the string data contain @cpp '\0' @ce
* thus prefer to use typed access in that case. * bytes, thus prefer to use typed access in that case.
* *
* In case of a @ref MaterialAttributeType::Buffer, returns a * In case of a @ref MaterialAttributeType::Buffer, returns a
* pointer to the data with no size information. Prefer to use typed * pointer to the data with no size information. Prefer to use typed
@ -1811,8 +1811,8 @@ values. You're expected to check for attribute presence first with
To make things easier, each of the attributes defined in @ref MaterialAttribute To make things easier, each of the attributes defined in @ref MaterialAttribute
has a strictly defined type, so you can safely assume the type when requesting has a strictly defined type, so you can safely assume the type when requesting
those. In addition there's @ref findAttribute() and @ref attributeOr() that those. In addition there's @ref findAttribute() and @ref attributeOr() that
return a @ref Containers::NullOpt or a default value in case given attribute is return a @relativeref{Corrade,Containers::NullOpt} or a default value in case
not found. given attribute is not found.
@snippet Trade.cpp MaterialData-usage @snippet Trade.cpp MaterialData-usage
@ -2274,9 +2274,10 @@ class MAGNUM_TRADE_EXPORT MaterialData {
/** /**
* @brief Find ID of a named layer * @brief Find ID of a named layer
* *
* The @p layer doesn't exist, returns @ref Containers::NullOpt. The * The @p layer doesn't exist, returns
* lookup is done in an @f$ \mathcal{O}(n) @f$ complexity with * @relativeref{Corrade,Containers::NullOpt}. The lookup is done in an
* @f$ n @f$ being the layer count. * @f$ \mathcal{O}(n) @f$ complexity with @f$ n @f$ being the layer
* count.
* @see @ref hasLayer() * @see @ref hasLayer()
*/ */
Containers::Optional<UnsignedInt> findLayerId(Containers::StringView layer) const; Containers::Optional<UnsignedInt> findLayerId(Containers::StringView layer) const;
@ -2526,10 +2527,11 @@ class MAGNUM_TRADE_EXPORT MaterialData {
/** /**
* @brief Find ID of a named attribute in given material layer * @brief Find ID of a named attribute in given material layer
* *
* If @p name doesn't exist, returns @ref Containers::NullOpt. The * If @p name doesn't exist, returns
* @p layer is expected to be smaller than @ref layerCount() const. The * @relativeref{Corrade,Containers::NullOpt}. The @p layer is expected
* lookup is done in an @f$ \mathcal{O}(\log n) @f$ complexity with * to be smaller than @ref layerCount() const. The lookup is done in an
* @f$ n @f$ being attribute count in given @p layer. * @f$ \mathcal{O}(\log n) @f$ complexity with @f$ n @f$ being
* attribute count in given @p layer.
* @see @ref hasAttribute(), @ref attributeId() * @see @ref hasAttribute(), @ref attributeId()
*/ */
Containers::Optional<UnsignedInt> findAttributeId(UnsignedInt layer, Containers::StringView name) const; Containers::Optional<UnsignedInt> findAttributeId(UnsignedInt layer, Containers::StringView name) const;
@ -2538,10 +2540,11 @@ class MAGNUM_TRADE_EXPORT MaterialData {
/** /**
* @brief Find ID of a named attribute in a named material layer * @brief Find ID of a named attribute in a named material layer
* *
* If @p name doesn't exist, returns @ref Containers::NullOpt. The * If @p name doesn't exist, returns
* @p layer is expected to exist. The lookup is done in an * @relativeref{Corrade,Containers::NullOpt}. The @p layer is expected
* @f$ \mathcal{O}(m + \log n) @f$ complexity with @f$ m @f$ being * to exist. The lookup is done in an @f$ \mathcal{O}(m + \log n) @f$
* layer count and @f$ n @f$ being attribute count in given @p layer. * complexity with @f$ m @f$ being layer count and @f$ n @f$ being
* attribute count in given @p layer.
* @see @ref hasLayer(), @ref hasAttribute(), @ref attributeId(), * @see @ref hasLayer(), @ref hasAttribute(), @ref attributeId(),
* @ref findLayerId() * @ref findLayerId()
*/ */
@ -2725,9 +2728,9 @@ class MAGNUM_TRADE_EXPORT MaterialData {
* *pointer to a pointer*, not the pointer value itself. * *pointer to a pointer*, not the pointer value itself.
* - In case of a @ref MaterialAttributeType::String returns a * - In case of a @ref MaterialAttributeType::String returns a
* null-terminated @cpp const char* @ce (not a pointer to * null-terminated @cpp const char* @ce (not a pointer to
* @ref Containers::StringView). This doesn't preserve the actual * @relativeref{Corrade,Containers::StringView}). This doesn't
* string size in case the string data contain zero bytes, thus * preserve the actual string size in case the string data contain
* prefer to use typed access in that case. * zero bytes, thus prefer to use typed access in that case.
* - In case of a @ref MaterialAttributeType::Buffer returns a * - In case of a @ref MaterialAttributeType::Buffer returns a
* pointer to the data with no size information, Prefer to use * pointer to the data with no size information, Prefer to use
* typed access in that case. * typed access in that case.
@ -2755,9 +2758,9 @@ class MAGNUM_TRADE_EXPORT MaterialData {
* *pointer to a pointer*, not the pointer value itself. * *pointer to a pointer*, not the pointer value itself.
* - In case of a @ref MaterialAttributeType::String returns a * - In case of a @ref MaterialAttributeType::String returns a
* null-terminated @cpp const char* @ce (not a pointer to * null-terminated @cpp const char* @ce (not a pointer to
* @ref Containers::StringView). This doesn't preserve the actual * @relativeref{Corrade,Containers::StringView}). This doesn't
* string size in case the string data contain zero bytes, thus * preserve the actual string size in case the string data contain
* prefer to use typed access in that case. * zero bytes, thus prefer to use typed access in that case.
* - In case of a @ref MaterialAttributeType::Buffer returns a * - In case of a @ref MaterialAttributeType::Buffer returns a
* pointer to the data with no size information, Prefer to use * pointer to the data with no size information, Prefer to use
* typed access in that case. * typed access in that case.
@ -2789,9 +2792,9 @@ class MAGNUM_TRADE_EXPORT MaterialData {
* *pointer to a pointer*, not the pointer value itself. * *pointer to a pointer*, not the pointer value itself.
* - In case of a @ref MaterialAttributeType::String returns a * - In case of a @ref MaterialAttributeType::String returns a
* null-terminated @cpp const char* @ce (not a pointer to * null-terminated @cpp const char* @ce (not a pointer to
* @ref Containers::StringView). This doesn't preserve the actual * @relativeref{Corrade,Containers::StringView}). This doesn't
* string size in case the string data contain zero bytes, thus * preserve the actual string size in case the string data contain
* prefer to use typed access in that case. * zero bytes, thus prefer to use typed access in that case.
* - In case of a @ref MaterialAttributeType::Buffer returns a * - In case of a @ref MaterialAttributeType::Buffer returns a
* pointer to the data with no size information, Prefer to use * pointer to the data with no size information, Prefer to use
* typed access in that case. * typed access in that case.
@ -2823,9 +2826,9 @@ class MAGNUM_TRADE_EXPORT MaterialData {
* *pointer to a pointer*, not the pointer value itself. * *pointer to a pointer*, not the pointer value itself.
* - In case of a @ref MaterialAttributeType::String returns a * - In case of a @ref MaterialAttributeType::String returns a
* null-terminated @cpp const char* @ce (not a pointer to * null-terminated @cpp const char* @ce (not a pointer to
* @ref Containers::StringView). This doesn't preserve the actual * @relativeref{Corrade,Containers::StringView}). This doesn't
* string size in case the string data contain zero bytes, thus * preserve the actual string size in case the string data contain
* prefer to use typed access in that case. * zero bytes, thus prefer to use typed access in that case.
* - In case of a @ref MaterialAttributeType::Buffer returns a * - In case of a @ref MaterialAttributeType::Buffer returns a
* pointer to the data with no size information, Prefer to use * pointer to the data with no size information, Prefer to use
* typed access in that case. * typed access in that case.

2
src/Magnum/Trade/MeshData.h

@ -1613,7 +1613,7 @@ class MAGNUM_TRADE_EXPORT MeshData {
* *
* If @p name isn't present or @p id is not smaller than * If @p name isn't present or @p id is not smaller than
* @ref attributeCount(MeshAttribute, Int) const, returns * @ref attributeCount(MeshAttribute, Int) const, returns
* @ref Containers::NullOpt. The lookup is done in an * @relativeref{Corrade,Containers::NullOpt}. The lookup is done in an
* @f$ \mathcal{O}(n) @f$ complexity with @f$ n @f$ being the attribute * @f$ \mathcal{O}(n) @f$ complexity with @f$ n @f$ being the attribute
* count. * count.
* @see @ref hasAttribute(), @ref attributeId() * @see @ref hasAttribute(), @ref attributeId()

54
src/Magnum/Trade/SceneData.h

@ -872,10 +872,10 @@ with @ref SceneFieldFlag::ImplicitMapping, which is a superset of
@subsection Trade-SceneFieldData-usage-bits Bit fields @subsection Trade-SceneFieldData-usage-bits Bit fields
Bit fields have dedicated constructors taking a Bit fields have dedicated constructors taking a
@ref Containers::StridedBitArrayView1D or @relativeref{Corrade,Containers::StridedBitArrayView1D} or
@ref Containers::StridedBitArrayView2D, and because the type is always @relativeref{Corrade,Containers::StridedBitArrayView2D}, and because the type
@ref SceneFieldType::Bit, it's omitted. For offset-only bit fields there's a is always @ref SceneFieldType::Bit, it's omitted. For offset-only bit fields
@ref SceneFieldData(SceneField, std::size_t, SceneMappingType, std::size_t, std::ptrdiff_t, std::size_t, std::size_t, std::ptrdiff_t, UnsignedShort, SceneFieldFlags) there's a @ref SceneFieldData(SceneField, std::size_t, SceneMappingType, std::size_t, std::ptrdiff_t, std::size_t, std::size_t, std::ptrdiff_t, UnsignedShort, SceneFieldFlags)
constructor that omits @ref SceneFieldType as well, but contains an additional constructor that omits @ref SceneFieldType as well, but contains an additional
bit offset parameter. bit offset parameter.
@ -1861,12 +1861,12 @@ references:
@ref std::strlen() call on every access. @ref std::strlen() call on every access.
String fields can also have @ref SceneFieldFlag::NullTerminatedString set, in String fields can also have @ref SceneFieldFlag::NullTerminatedString set, in
which case the returned @ref Containers::StringView instances will have which case the returned @relativeref{Corrade,Containers::StringView} instances
@relativeref{Corrade,Containers::StringViewFlag::NullTerminated} set, which may will have @relativeref{Corrade,Containers::StringViewFlag::NullTerminated} set,
be useful for example to avoid an allocation when passing filenames to OS APIs which may be useful for example to avoid an allocation when passing filenames
in @ref Utility::Path::read(). The null terminators of course have to be stored to OS APIs in @relativeref{Corrade,Utility::Path::read()}. The null terminators
in the data itself, see a particular @ref SceneFieldType for information about of course have to be stored in the data itself, see a particular
how it affects the field encoding. @ref SceneFieldType for information about how it affects the field encoding.
The following example shows populating a @ref SceneData with a "tag" string The following example shows populating a @ref SceneData with a "tag" string
field, stored as null-terminated 8-bit string array ranges. In other words --- field, stored as null-terminated 8-bit string array ranges. In other words ---
@ -2206,9 +2206,10 @@ class MAGNUM_TRADE_EXPORT SceneData {
* @brief Find an absolute ID of a named field * @brief Find an absolute ID of a named field
* @m_since_latest * @m_since_latest
* *
* If @p name doesn't exist, returns @ref Containers::NullOpt. The * If @p name doesn't exist, returns
* lookup is done in an @f$ \mathcal{O}(n) @f$ complexity with * @relativeref{Corrade,Containers::NullOpt}. The lookup is done in an
* @f$ n @f$ being the field count. * @f$ \mathcal{O}(n) @f$ complexity with @f$ n @f$ being the field
* count.
* @see @ref hasField(), @ref fieldId() * @see @ref hasField(), @ref fieldId()
*/ */
Containers::Optional<UnsignedInt> findFieldId(SceneField name) const; Containers::Optional<UnsignedInt> findFieldId(SceneField name) const;
@ -2235,9 +2236,9 @@ class MAGNUM_TRADE_EXPORT SceneData {
* @m_since_latest * @m_since_latest
* *
* If @p object isn't present in @p fieldId starting at @p offset, * If @p object isn't present in @p fieldId starting at @p offset,
* returns @ref Containers::NullOpt. The @p fieldId is expected to be * returns @relativeref{Corrade,Containers::NullOpt}. The @p fieldId is
* smaller than @ref fieldCount(), @p object smaller than * expected to be smaller than @ref fieldCount(), @p object smaller
* @ref mappingBound() and @p offset not larger than * than @ref mappingBound() and @p offset not larger than
* @ref fieldSize(UnsignedInt) const. * @ref fieldSize(UnsignedInt) const.
* *
* If the field has @ref SceneFieldFlag::ImplicitMapping, the lookup is * If the field has @ref SceneFieldFlag::ImplicitMapping, the lookup is
@ -2259,9 +2260,10 @@ class MAGNUM_TRADE_EXPORT SceneData {
* @m_since_latest * @m_since_latest
* *
* If @p object isn't present in @p fieldName starting at @p offset, * If @p object isn't present in @p fieldName starting at @p offset,
* returns @ref Containers::NullOpt. The @p fieldName is expected to * returns @relativeref{Corrade,Containers::NullOpt}. The @p fieldName
* exist, @p object is expected to be smaller than @ref mappingBound() * is expected to exist, @p object is expected to be smaller than
* and @p offset not be larger than @ref fieldSize(SceneField) const. * @ref mappingBound() and @p offset not be larger than
* @ref fieldSize(SceneField) const.
* *
* If the field has @ref SceneFieldFlag::ImplicitMapping, the lookup is * If the field has @ref SceneFieldFlag::ImplicitMapping, the lookup is
* done in an @f$ \mathcal{O}(m) @f$ complexity with @f$ m @f$ being * done in an @f$ \mathcal{O}(m) @f$ complexity with @f$ m @f$ being
@ -3428,8 +3430,8 @@ class MAGNUM_TRADE_EXPORT SceneData {
* directly. * directly.
* *
* If the @ref SceneField::Parent field is not present or if there's no * If the @ref SceneField::Parent field is not present or if there's no
* parent for @p object, returns @ref Containers::NullOpt. If @p object * parent for @p object, returns @relativeref{Corrade,Containers::NullOpt}.
* is top-level, returns @cpp -1 @ce. * If @p object is top-level, returns @cpp -1 @ce.
* *
* The @p object is expected to be less than @ref mappingBound(). * The @p object is expected to be less than @ref mappingBound().
* @see @ref childrenFor() * @see @ref childrenFor()
@ -3476,7 +3478,7 @@ class MAGNUM_TRADE_EXPORT SceneData {
* @ref SceneField::Translation, @relativeref{SceneField,Rotation} or * @ref SceneField::Translation, @relativeref{SceneField,Rotation} or
* @relativeref{SceneField,Scaling} is present, the fields represent a * @relativeref{SceneField,Scaling} is present, the fields represent a
* 3D transformation or there's no transformation for @p object, * 3D transformation or there's no transformation for @p object,
* returns @ref Containers::NullOpt. * returns @relativeref{Corrade,Containers::NullOpt}.
* *
* The @p object is expected to be less than @ref mappingBound(). * The @p object is expected to be less than @ref mappingBound().
* @see @ref translationRotationScaling2DFor() * @see @ref translationRotationScaling2DFor()
@ -3505,7 +3507,7 @@ class MAGNUM_TRADE_EXPORT SceneData {
* (@cpp 1.0f @ce in both dimensions). If neither of those fields is * (@cpp 1.0f @ce in both dimensions). If neither of those fields is
* present, if any of the fields represents a 3D transformation or if * present, if any of the fields represents a 3D transformation or if
* there's no transformation for @p object, returns * there's no transformation for @p object, returns
* @ref Containers::NullOpt. * @relativeref{Corrade,Containers::NullOpt}.
* *
* The @p object is expected to be less than @ref mappingBound(). * The @p object is expected to be less than @ref mappingBound().
* @see @ref transformation2DFor() * @see @ref transformation2DFor()
@ -3531,7 +3533,7 @@ class MAGNUM_TRADE_EXPORT SceneData {
* @ref SceneField::Translation, @relativeref{SceneField,Rotation} or * @ref SceneField::Translation, @relativeref{SceneField,Rotation} or
* @relativeref{SceneField,Scaling} is present, the fields represent a * @relativeref{SceneField,Scaling} is present, the fields represent a
* 2D transformation or there's no transformation for @p object, * 2D transformation or there's no transformation for @p object,
* returns @ref Containers::NullOpt. * returns @relativeref{Corrade,Containers::NullOpt}.
* *
* The @p object is expected to be less than @ref mappingBound(). * The @p object is expected to be less than @ref mappingBound().
* @see @ref translationRotationScaling3DFor() * @see @ref translationRotationScaling3DFor()
@ -3560,7 +3562,7 @@ class MAGNUM_TRADE_EXPORT SceneData {
* (@cpp 1.0f @ce in all dimensions). If neither of those fields is * (@cpp 1.0f @ce in all dimensions). If neither of those fields is
* present, if any of the fields represents a 2D transformation or if * present, if any of the fields represents a 2D transformation or if
* there's no transformation for @p object, returns * there's no transformation for @p object, returns
* @ref Containers::NullOpt. * @relativeref{Corrade,Containers::NullOpt}.
* *
* The @p object is expected to be less than @ref mappingBound(). * The @p object is expected to be less than @ref mappingBound().
* @see @ref transformation3DFor() * @see @ref transformation3DFor()
@ -3658,7 +3660,7 @@ class MAGNUM_TRADE_EXPORT SceneData {
* *
* If the @ref SceneField::ImporterState field is not present or if * If the @ref SceneField::ImporterState field is not present or if
* there's no importer state for @p object, returns * there's no importer state for @p object, returns
* @ref Containers::NullOpt. * @relativeref{Corrade,Containers::NullOpt}.
* *
* The @p object is expected to be less than @ref mappingBound(). * The @p object is expected to be less than @ref mappingBound().
*/ */

14
src/Magnum/Vk/DescriptorPool.h

@ -156,9 +156,10 @@ class MAGNUM_VK_EXPORT DescriptorPool {
* *
* Compared to @ref allocate(VkDescriptorSetLayout), if the allocation * Compared to @ref allocate(VkDescriptorSetLayout), if the allocation
* fails with @ref Result::ErrorOutOfPoolMemory or * fails with @ref Result::ErrorOutOfPoolMemory or
* @ref Result::ErrorFragmentedPool, @ref Containers::NullOpt is * @ref Result::ErrorFragmentedPool,
* returned instead of aborting to allow the application to recover and * @relativeref{Corrade,Containers::NullOpt} is returned instead of
* choose a different strategy. * aborting to allow the application to recover and choose a different
* strategy.
* *
* If Vulkan 1.1 is not supported by the device and the * If Vulkan 1.1 is not supported by the device and the
* @vk_extension{KHR,maintenance1} extension isn't enabled on the * @vk_extension{KHR,maintenance1} extension isn't enabled on the
@ -193,9 +194,10 @@ class MAGNUM_VK_EXPORT DescriptorPool {
* *
* Compared to @ref allocate(VkDescriptorSetLayout, UnsignedInt), if * Compared to @ref allocate(VkDescriptorSetLayout, UnsignedInt), if
* the allocation fails with @ref Result::ErrorOutOfPoolMemory or * the allocation fails with @ref Result::ErrorOutOfPoolMemory or
* @ref Result::ErrorFragmentedPool, @ref Containers::NullOpt is * @ref Result::ErrorFragmentedPool,
* returned instead of aborting to allow the application to recover and * @relativeref{Corrade,Containers::NullOpt} is returned instead of
* choose a different strategy. * aborting to allow the application to recover and choose a different
* strategy.
* *
* If Vulkan 1.1 is not supported by the device and the * If Vulkan 1.1 is not supported by the device and the
* @vk_extension{KHR,maintenance1} extension isn't enabled on the * @vk_extension{KHR,maintenance1} extension isn't enabled on the

13
src/Magnum/Vk/DeviceProperties.h

@ -579,8 +579,8 @@ class MAGNUM_VK_EXPORT DeviceProperties {
* @brief Try to pick a queue family satisfying given flags * @brief Try to pick a queue family satisfying given flags
* *
* Compared to @ref pickQueueFamily() the function returns * Compared to @ref pickQueueFamily() the function returns
* @ref Containers::NullOpt if a desired family isn't found instead of * @relativeref{Corrade,Containers::NullOpt} if a desired family isn't
* exiting. * found instead of exiting.
*/ */
Containers::Optional<UnsignedInt> tryPickQueueFamily(QueueFlags flags); Containers::Optional<UnsignedInt> tryPickQueueFamily(QueueFlags flags);
@ -701,8 +701,8 @@ class MAGNUM_VK_EXPORT DeviceProperties {
* @brief Try to pick a memory type satisfying given flags * @brief Try to pick a memory type satisfying given flags
* *
* Compared to @ref pickMemory() the function returns * Compared to @ref pickMemory() the function returns
* @ref Containers::NullOpt if a desired memory type isn't found * @relativeref{Corrade,Containers::NullOpt} if a desired memory type
* instead of exiting. * isn't found instead of exiting.
*/ */
Containers::Optional<UnsignedInt> tryPickMemory(MemoryFlags requiredFlags, MemoryFlags preferredFlags = {}, UnsignedInt memories = ~UnsignedInt{}); Containers::Optional<UnsignedInt> tryPickMemory(MemoryFlags requiredFlags, MemoryFlags preferredFlags = {}, UnsignedInt memories = ~UnsignedInt{});
@ -810,8 +810,9 @@ MAGNUM_VK_EXPORT DeviceProperties pickDevice(Instance& instance);
@brief Try to pick a physical device @brief Try to pick a physical device
@m_since_latest @m_since_latest
Compared to @ref pickDevice() the function returns @ref Containers::NullOpt if Compared to @ref pickDevice() the function returns
a device isn't found instead of exiting. @relativeref{Corrade,Containers::NullOpt} if a device isn't found instead of
exiting.
*/ */
MAGNUM_VK_EXPORT Containers::Optional<DeviceProperties> tryPickDevice(Instance& instance); MAGNUM_VK_EXPORT Containers::Optional<DeviceProperties> tryPickDevice(Instance& instance);

15
src/Magnum/Vk/PixelFormat.h

@ -1479,9 +1479,10 @@ MAGNUM_VK_EXPORT PixelFormat pixelFormat(Magnum::CompressedPixelFormat format);
@brief Convert Vulkan pixel format to a generic pixel format @brief Convert Vulkan pixel format to a generic pixel format
@m_since_latest @m_since_latest
Returns @ref Containers::NullOpt if given format is compressed or if it doesn't Returns @relativeref{Corrade,Containers::NullOpt} if given format is compressed
match any generic pixel format. Otherwise the returned value will result in the or if it doesn't match any generic pixel format. Otherwise the returned value
same @p format when passed back to @ref pixelFormat(Magnum::PixelFormat). will result in the same @p format when passed back to
@ref pixelFormat(Magnum::PixelFormat).
Unlike mapping *from* a generic pixel format, the inverse operation is done Unlike mapping *from* a generic pixel format, the inverse operation is done
with an @f$ \mathcal{O}(n) @f$ complexity. with an @f$ \mathcal{O}(n) @f$ complexity.
@ -1493,10 +1494,10 @@ MAGNUM_VK_EXPORT Containers::Optional<Magnum::PixelFormat> genericPixelFormat(Pi
@brief Convert Vulkan compressed pixel format to a generic compressed pixel format @brief Convert Vulkan compressed pixel format to a generic compressed pixel format
@m_since_latest @m_since_latest
Returns @ref Containers::NullOpt if given format is not compressed or if it Returns @relativeref{Corrade,Containers::NullOpt} if given format is not
doesn't match any generic compressed pixel format. Otherwise the returned value compressed or if it doesn't match any generic compressed pixel format.
will result in the same @p format when passed back to Otherwise the returned value will result in the same @p format when passed back
@ref pixelFormat(Magnum::CompressedPixelFormat). to @ref pixelFormat(Magnum::CompressedPixelFormat).
An exception is PVRTC formats --- the RGB and RGBA variants map to the same An exception is PVRTC formats --- the RGB and RGBA variants map to the same
Vulkan format, e.g. @ref Magnum::CompressedPixelFormat::PvrtcRGB2bppSrgb and Vulkan format, e.g. @ref Magnum::CompressedPixelFormat::PvrtcRGB2bppSrgb and

Loading…
Cancel
Save