From 73f5f0b8b03be62ab155795d8eeeb1696e72d4be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Fri, 12 May 2023 22:04:27 +0200 Subject: [PATCH] Document how *Flag::Quiet and *Flag::Verbose is used by plugins. --- src/MagnumPlugins/AnyImageConverter/AnyImageConverter.h | 5 +++++ src/MagnumPlugins/AnyImageImporter/AnyImageImporter.h | 5 +++++ src/MagnumPlugins/AnySceneConverter/AnySceneConverter.h | 5 +++++ src/MagnumPlugins/AnySceneImporter/AnySceneImporter.h | 5 +++++ src/MagnumPlugins/AnyShaderConverter/AnyConverter.h | 5 +++++ src/MagnumPlugins/TgaImageConverter/TgaImageConverter.h | 4 ++++ src/MagnumPlugins/TgaImporter/TgaImporter.h | 4 ++++ 7 files changed, 33 insertions(+) diff --git a/src/MagnumPlugins/AnyImageConverter/AnyImageConverter.h b/src/MagnumPlugins/AnyImageConverter/AnyImageConverter.h index e648758d7..9e85323a0 100644 --- a/src/MagnumPlugins/AnyImageConverter/AnyImageConverter.h +++ b/src/MagnumPlugins/AnyImageConverter/AnyImageConverter.h @@ -134,6 +134,11 @@ empty string. The output of the @ref convertToFile() function called on the concrete implementation is then proxied back. + +Besides delegating the flags, the @ref AnyImageConverter itself recognizes +@ref ImageConverterFlag::Verbose, printing info about the concrete plugin being +used when the flag is enabled. @ref ImageConverterFlag::Quiet is recognized as +well and causes all warnings to be suppressed. */ class MAGNUM_ANYIMAGECONVERTER_EXPORT AnyImageConverter: public AbstractImageConverter { public: diff --git a/src/MagnumPlugins/AnyImageImporter/AnyImageImporter.h b/src/MagnumPlugins/AnyImageImporter/AnyImageImporter.h index 2e6978cc5..6cc675875 100644 --- a/src/MagnumPlugins/AnyImageImporter/AnyImageImporter.h +++ b/src/MagnumPlugins/AnyImageImporter/AnyImageImporter.h @@ -161,6 +161,11 @@ Calls to the @ref image1DCount() / @ref image2DCount() / @ref image3DCount(), and @ref image1D() / @ref image2D() / @ref image3D() functions are then proxied to the concrete implementation. The @ref close() function closes and discards the internally instantiated plugin; @ref isOpened() works as usual. + +Besides delegating the flags, the @ref AnyImageImporter itself recognizes +@ref ImporterFlag::Verbose, printing info about the concrete plugin being used +when the flag is enabled. @ref ImporterFlag::Quiet is recognized as well and +causes all warnings to be suppressed. */ class MAGNUM_ANYIMAGEIMPORTER_EXPORT AnyImageImporter: public AbstractImporter { public: diff --git a/src/MagnumPlugins/AnySceneConverter/AnySceneConverter.h b/src/MagnumPlugins/AnySceneConverter/AnySceneConverter.h index 8e6e0922c..66194a5c4 100644 --- a/src/MagnumPlugins/AnySceneConverter/AnySceneConverter.h +++ b/src/MagnumPlugins/AnySceneConverter/AnySceneConverter.h @@ -121,6 +121,11 @@ advertising support for any actual data types. These are included only once Calls to the @ref endFile(), @ref add() and related functions are then proxied to the concrete implementation. The @ref abort() function aborts and destroys the internally instantiated plugin; @ref isConverting() works as usual. + +Besides delegating the flags, the @ref AnySceneConverter itself recognizes +@ref SceneConverterFlag::Verbose, printing info about the concrete plugin being +used when the flag is enabled. @ref SceneConverterFlag::Quiet is recognized as +well and causes all warnings to be suppressed. */ class MAGNUM_ANYSCENECONVERTER_EXPORT AnySceneConverter: public AbstractSceneConverter { public: diff --git a/src/MagnumPlugins/AnySceneImporter/AnySceneImporter.h b/src/MagnumPlugins/AnySceneImporter/AnySceneImporter.h index 64039e22e..27e97521a 100644 --- a/src/MagnumPlugins/AnySceneImporter/AnySceneImporter.h +++ b/src/MagnumPlugins/AnySceneImporter/AnySceneImporter.h @@ -157,6 +157,11 @@ plugin; @ref isOpened() works as usual. While the @ref meshAttributeName(), @ref meshAttributeForName(), @ref sceneFieldName() and @ref sceneFieldForName() APIs can be called without a file opened, they return an empty string or an invalid attribute in that case. + +Besides delegating the flags, the @ref AnySceneImporter itself recognizes +@ref ImporterFlag::Verbose, printing info about the concrete plugin being used +when the flag is enabled. @ref ImporterFlag::Quiet is recognized as well and +causes all warnings to be suppressed. */ class MAGNUM_ANYSCENEIMPORTER_EXPORT AnySceneImporter: public AbstractImporter { public: diff --git a/src/MagnumPlugins/AnyShaderConverter/AnyConverter.h b/src/MagnumPlugins/AnyShaderConverter/AnyConverter.h index c68aa4fc4..af61b3c86 100644 --- a/src/MagnumPlugins/AnyShaderConverter/AnyConverter.h +++ b/src/MagnumPlugins/AnyShaderConverter/AnyConverter.h @@ -146,6 +146,11 @@ present in the default configuration of the target plugin. The output of the @ref validateFile() / @ref validateData(), @ref convertFileToFile() / @ref convertFileToData() / @ref convertDataToData() function called on the concrete implementation is then proxied back. + +Besides delegating the flags, the @ref AnyConverter itself recognizes +@ref ConverterFlag::Verbose, printing info about the concrete plugin being used +when the flag is enabled. @ref ConverterFlag::Quiet is recognized as well and +causes all warnings to be suppressed. */ class MAGNUM_ANYSHADERCONVERTER_EXPORT AnyConverter: public AbstractConverter { public: diff --git a/src/MagnumPlugins/TgaImageConverter/TgaImageConverter.h b/src/MagnumPlugins/TgaImageConverter/TgaImageConverter.h index 3c3391cf9..dc36f603f 100644 --- a/src/MagnumPlugins/TgaImageConverter/TgaImageConverter.h +++ b/src/MagnumPlugins/TgaImageConverter/TgaImageConverter.h @@ -114,6 +114,10 @@ While TGA files can have several extensions, @ref extension() always returns @cpp "tga" @ce as that's the most common one. As TGA doesn't have a registered MIME type, @ref mimeType() returns @cpp "image/x-tga" @ce. +The converter recognizes @ref ImageConverterFlag::Verbose, printing additional +info when the flag is enabled. @ref ImageConverterFlag::Quiet is recognized as +well and causes all conversion warnings to be suppressed. + @section Trade-TgaImageConverter-configuration Plugin-specific configuration It's possible to tune various output options through @ref configuration(). See diff --git a/src/MagnumPlugins/TgaImporter/TgaImporter.h b/src/MagnumPlugins/TgaImporter/TgaImporter.h index 1c6fad99b..aa4467a70 100644 --- a/src/MagnumPlugins/TgaImporter/TgaImporter.h +++ b/src/MagnumPlugins/TgaImporter/TgaImporter.h @@ -108,6 +108,10 @@ RLE compression is supported, paletted images are not. If a TGA 2 footer is recognized in the file, the optional extension and developer area blocks at the end of the file are ignored. + +The importer recognizes @ref ImporterFlag::Verbose, printing additional info +when the flag is enabled. @ref ImporterFlag::Quiet is recognized as well and +causes all import warnings to be suppressed. */ class MAGNUM_TGAIMPORTER_EXPORT TgaImporter: public AbstractImporter { public: