diff --git a/src/Magnum/Audio/AbstractImporter.h b/src/Magnum/Audio/AbstractImporter.h index bbcc83bfe..73cdc6586 100644 --- a/src/Magnum/Audio/AbstractImporter.h +++ b/src/Magnum/Audio/AbstractImporter.h @@ -167,7 +167,8 @@ class MAGNUM_AUDIO_EXPORT AbstractImporter: public PluginManager::AbstractManagi * * Closes previous file, if it was opened, and tries to open given * file. Available only if @ref ImporterFeature::OpenData is supported. - * Returns @cpp true @ce on success, @cpp false @ce otherwise. + * On failure prints a message to @relativeref{Magnum,Error} and + * returns @cpp false @ce. * @see @ref features(), @ref openFile() */ bool openData(Containers::ArrayView data); @@ -176,7 +177,8 @@ class MAGNUM_AUDIO_EXPORT AbstractImporter: public PluginManager::AbstractManagi * @brief Open file * * Closes previous file, if it was opened, and tries to open given - * file. Returns @cpp true @ce on success, @cpp false @ce otherwise. + * file. On failure prints a message to @relativeref{Magnum,Error} and + * returns @cpp false @ce. * @see @ref features(), @ref openData() */ bool openFile(const std::string& filename); diff --git a/src/Magnum/ShaderTools/AbstractConverter.h b/src/Magnum/ShaderTools/AbstractConverter.h index f3fbcdf04..e284a9e7d 100644 --- a/src/Magnum/ShaderTools/AbstractConverter.h +++ b/src/Magnum/ShaderTools/AbstractConverter.h @@ -754,7 +754,7 @@ class MAGNUM_SHADERTOOLS_EXPORT AbstractConverter: public PluginManager::Abstrac * - @cpp false @ce if validation doesn't pass. If an external error * occurs (for example a referenced file not being found), it may * also happen that the returned string is empty and a message is - * printed to error output instead. + * printed to @relativeref{Magnum,Error} instead. * * @see @ref features(), @ref validateFile() */ @@ -773,7 +773,7 @@ class MAGNUM_SHADERTOOLS_EXPORT AbstractConverter: public PluginManager::Abstrac * - @cpp false @ce if validation doesn't pass. If an external error * occurs (for example when a file cannot be read), it may also * happen that the returned string is empty and a message is - * printed to error output instead. + * printed to @relativeref{Magnum,Error} instead. * * Corresponds to the `--validate` option in * @ref magnum-shaderconverter "magnum-shaderconverter". @@ -785,8 +785,8 @@ class MAGNUM_SHADERTOOLS_EXPORT AbstractConverter: public PluginManager::Abstrac * @brief Convert shader data to a data * * Available only if @ref ConverterFeature::ConvertData is supported. - * On failure the function prints an error message and returns - * @cpp nullptr @ce. + * On failure prints a message to @relativeref{Magnum,Error} and + * returns @cpp nullptr @ce. * @see @ref features(), @ref convertDataToFile(), * @ref convertFileToData(), @ref convertFileToFile() */ @@ -796,8 +796,8 @@ class MAGNUM_SHADERTOOLS_EXPORT AbstractConverter: public PluginManager::Abstrac * @brief Convert shader data to a file * * Available only if @ref ConverterFeature::ConvertData is supported. - * Returns @cpp true @ce on success, prints an error message and - * returns @cpp false @ce otherwise. + * On failure prints a message to @relativeref{Magnum,Error} and + * returns @cpp false @ce. * @see @ref features(), @ref convertDataToData(), * @ref convertFileToData(), @ref convertFileToFile() */ @@ -807,9 +807,8 @@ class MAGNUM_SHADERTOOLS_EXPORT AbstractConverter: public PluginManager::Abstrac * @brief Convert shader file to a file * * Available only if @ref ConverterFeature::ConvertFile or - * @ref ConverterFeature::ConvertData is supported. Returns - * @cpp true @ce on success, prints an error message and returns - * @cpp false @ce otherwise. + * @ref ConverterFeature::ConvertData is supported. On failure prints a + * message to @relativeref{Magnum,Error} and returns @cpp false @ce. * * Corresponds to the default behavior of * @ref magnum-shaderconverter "magnum-shaderconverter" when neither @@ -823,8 +822,8 @@ class MAGNUM_SHADERTOOLS_EXPORT AbstractConverter: public PluginManager::Abstrac * @brief Convert shader data to a file * * Available only if @ref ConverterFeature::ConvertData is supported. - * On failure the function prints an error message and returns - * @cpp nullptr @ce. + * On failure prints a message to @relativeref{Magnum,Error} and + * returns @cpp nullptr @ce. * @see @ref features(), @ref convertFileToFile(), * @ref convertDataToFile(), @ref convertDataToData() */ @@ -834,7 +833,7 @@ class MAGNUM_SHADERTOOLS_EXPORT AbstractConverter: public PluginManager::Abstrac * @brief Link shader data together to a data * * Available only if @ref ConverterFeature::LinkData is supported. On - * failure the function prints an error message and returns + * failure prints a message to @relativeref{Magnum,Error} and returns * @cpp nullptr @ce. Can't be called if * @ref ConverterFlag::PreprocessOnly is set --- in that case * @ref convertDataToData() has to be used instead. @@ -849,8 +848,8 @@ class MAGNUM_SHADERTOOLS_EXPORT AbstractConverter: public PluginManager::Abstrac * @brief Link shader data together to a file * * Available only if @ref ConverterFeature::LinkData is supported. On - * Returns @cpp true @ce on success, prints an error message and - * returns @cpp false @ce otherwise. Can't be called if + * failure prints a message to @relativeref{Magnum,Error} and returns + * @cpp false @ce. Can't be called if * @ref ConverterFlag::PreprocessOnly is set --- in that case * @ref convertDataToFile() has to be used instead. * @see @ref features(), @ref linkFilesToFile(), @@ -865,11 +864,10 @@ class MAGNUM_SHADERTOOLS_EXPORT AbstractConverter: public PluginManager::Abstrac * @brief Link shader files together to a file * * Available only if @ref ConverterFeature::LinkFile or - * @ref ConverterFeature::LinkData is supported. Returns @cpp true @ce - * on success, prints an error message and returns @cpp false @ce - * otherwise. Can't be called if @ref ConverterFlag::PreprocessOnly is - * set --- in that case @ref convertFileToFile() has to be used - * instead. + * @ref ConverterFeature::LinkData is supported. On failure prints a + * message to @relativeref{Magnum,Error} and returns @cpp false @ce. + * Can't be called if @ref ConverterFlag::PreprocessOnly is set --- in + * that case @ref convertFileToFile() has to be used instead. * * Corresponds to the `--link` option in * @ref magnum-shaderconverter "magnum-shaderconverter". @@ -884,8 +882,8 @@ class MAGNUM_SHADERTOOLS_EXPORT AbstractConverter: public PluginManager::Abstrac /** * @brief Link shader files together to a data * - * Available only if @ref ConverterFeature::LinkData is supported, On - * failure the function prints an error message and returns + * Available only if @ref ConverterFeature::LinkData is supported. On + * failure prints a message to @relativeref{Magnum,Error} and returns * @cpp nullptr @ce. Can't be called if * @ref ConverterFlag::PreprocessOnly is set --- in that case * @ref convertFileToData() has to be used instead. diff --git a/src/Magnum/Text/AbstractFont.h b/src/Magnum/Text/AbstractFont.h index d79fa07a8..376d1b0b1 100644 --- a/src/Magnum/Text/AbstractFont.h +++ b/src/Magnum/Text/AbstractFont.h @@ -318,7 +318,8 @@ class MAGNUM_TEXT_EXPORT AbstractFont: public PluginManager::AbstractPlugin { * * Closes previous file, if it was opened, and tries to open given * file. Available only if @ref FontFeature::OpenData is supported. - * Returns @cpp true @ce on success, @cpp false @ce otherwise. + * On failure prints a message to @relativeref{Magnum,Error} and + * returns @cpp false @ce. * @see @ref features(), @ref openFile() */ bool openData(Containers::ArrayView data, Float size); @@ -343,7 +344,8 @@ class MAGNUM_TEXT_EXPORT AbstractFont: public PluginManager::AbstractPlugin { * @param size Font size * * Closes previous file, if it was opened, and tries to open given - * file. Returns @cpp true @ce on success, @cpp false @ce otherwise. + * file. On failure prints a message to @relativeref{Magnum,Error} and + * returns @cpp false @ce. */ bool openFile(const std::string& filename, Float size); diff --git a/src/Magnum/Text/AbstractFontConverter.h b/src/Magnum/Text/AbstractFontConverter.h index d1d487061..d27b52b59 100644 --- a/src/Magnum/Text/AbstractFontConverter.h +++ b/src/Magnum/Text/AbstractFontConverter.h @@ -218,11 +218,12 @@ class MAGNUM_TEXT_EXPORT AbstractFontConverter: public PluginManager::AbstractPl * * Available only if @ref FontConverterFeature::ConvertData and * @ref FontConverterFeature::ExportFont is supported. Returns pairs of - * filename and data on success, empty vector otherwise. All data will - * be sharing common basename derived from @p filename. If the plugin - * doesn't have @ref FontConverterFeature::MultiFile, only one pair is - * returned, thus using @ref exportFontToSingleData() might be more - * convenient in that case. + * filename and data on success, prints a message to + * @relativeref{Magnum,Error} and returns an empty vector otherwise. + * All data will be sharing common basename derived from @p filename. + * If the plugin doesn't have @ref FontConverterFeature::MultiFile, + * only one pair is returned, thus using @ref exportFontToSingleData() + * might be more convenient in that case. * @see @ref features(), @ref exportFontToFile(), * @ref exportGlyphCacheToData() */ @@ -233,9 +234,9 @@ class MAGNUM_TEXT_EXPORT AbstractFontConverter: public PluginManager::AbstractPl * * Available only if @ref FontConverterFeature::ConvertData and * @ref FontConverterFeature::ExportFont is supported and the plugin - * doesn't have @ref FontConverterFeature::MultiFile. Returns data on - * success, zero-sized array otherwise. See @ref exportFontToData() for - * more information. + * doesn't have @ref FontConverterFeature::MultiFile. On failure prints + * a message to @relativeref{Magnum,Error} and returns + * @cpp nullptr @ce. See @ref exportFontToData() for more information. * @see @ref features(), @ref exportFontToFile(), * @ref exportGlyphCacheToSingleData() */ @@ -247,9 +248,9 @@ class MAGNUM_TEXT_EXPORT AbstractFontConverter: public PluginManager::AbstractPl * Available only if @ref FontConverterFeature::ExportFont is * supported. If the plugin has @ref FontConverterFeature::MultiFile, * the function will create more than one file in given path, all - * sharing common basename derived from @p filename. Returns - * @cpp true @ce on success, @cpp false @ce otherwise. See - * @ref exportFontToData() for more information. + * sharing common basename derived from @p filename. On failure prints + * a message to @relativeref{Magnum,Error} and returns @cpp false @ce. + * See @ref exportFontToData() for more information. * @see @ref features(), @ref exportFontToData(), * @ref exportGlyphCacheToFile() */ @@ -262,11 +263,13 @@ class MAGNUM_TEXT_EXPORT AbstractFontConverter: public PluginManager::AbstractPl * * Available only if @ref FontConverterFeature::ConvertData and * @ref FontConverterFeature::ExportGlyphCache is supported. Returns - * pairs of filename and data on success, empty vector otherwise. All - * data will be sharing common basename derived from @p filename. If - * the plugin doesn't have @ref FontConverterFeature::MultiFile, only - * one pair is returned, thus using @ref exportGlyphCacheToSingleData() - * might be more convenient in that case. + * pairs of filename and data on success, prints a message to + * @relativeref{Magnum,Error} and returns an empty vector otherwise. + * All data will be sharing common basename derived from @p filename. + * If the plugin doesn't have @ref FontConverterFeature::MultiFile, + * only one pair is returned, thus using + * @ref exportGlyphCacheToSingleData() might be more convenient in that + * case. * * All glyphs from given cache will be exported. If you want to export * smaller subset, fill the cache with less characters. @@ -280,9 +283,10 @@ class MAGNUM_TEXT_EXPORT AbstractFontConverter: public PluginManager::AbstractPl * * Available only if @ref FontConverterFeature::ConvertData and * @ref FontConverterFeature::ExportGlyphCache is supported and the - * plugin doesn't have @ref FontConverterFeature::MultiFile. Returns - * data on success, zero-sized array otherwise. See - * @ref exportGlyphCacheToData() for more information. + * plugin doesn't have @ref FontConverterFeature::MultiFile. On failure + * prints a message to @relativeref{Magnum,Error} and returns + * @cpp nullptr @ce. See @ref exportGlyphCacheToData() for more + * information. * @see @ref features(), @ref exportGlyphCacheToFile(), * @ref importGlyphCacheFromSingleData() */ @@ -294,8 +298,8 @@ class MAGNUM_TEXT_EXPORT AbstractFontConverter: public PluginManager::AbstractPl * Available only if @ref FontConverterFeature::ExportGlyphCache is * supported. If the plugin has @ref FontConverterFeature::MultiFile, * the function will create more than one file in given path, all - * sharing common basename derived from @p filename. Returns - * @cpp true @ce on success, @cpp false @ce otherwise. + * sharing common basename derived from @p filename. On failure prints + * a message to @relativeref{Magnum,Error} and returns @cpp false @ce. * @see @ref features(), @ref exportGlyphCacheToData(), * @ref exportFontToFile() */ @@ -306,11 +310,12 @@ class MAGNUM_TEXT_EXPORT AbstractFontConverter: public PluginManager::AbstractPl * @param data Pairs of filename and file data * * Available only if @ref FontConverterFeature::ConvertData and - * @ref FontConverterFeature::ImportGlyphCache is supported. Returns - * imported cache on success, @cpp nullptr @ce otherwise. If the plugin - * doesn't have @ref FontConverterFeature::MultiFile, only one file is - * needed, thus using @ref importGlyphCacheFromSingleData() might be - * more convenient in that case. + * @ref FontConverterFeature::ImportGlyphCache is supported. On failure + * prints a message to @relativeref{Magnum,Error} and returns + * @cpp nullptr @ce. If the plugin doesn't have + * @ref FontConverterFeature::MultiFile, only one file is needed, thus + * using @ref importGlyphCacheFromSingleData() might be more convenient + * in that case. * @see @ref features(), @ref importGlyphCacheFromFile(), * @ref exportGlyphCacheToData() */ @@ -321,9 +326,10 @@ class MAGNUM_TEXT_EXPORT AbstractFontConverter: public PluginManager::AbstractPl * * Available only if @ref FontConverterFeature::ConvertData and * @ref FontConverterFeature::ImportGlyphCache is supported and the - * plugin doesn't have @ref FontConverterFeature::MultiFile. Returns - * imported cache on success, @cpp nullptr @ce otherwise. See - * @ref importGlyphCacheFromData() for multi-file conversion. + * plugin doesn't have @ref FontConverterFeature::MultiFile. On failure + * prints a message to @relativeref{Magnum,Error} and returns + * @cpp nullptr @ce. See @ref importGlyphCacheFromData() for multi-file + * conversion. * @see @ref features(), @ref importGlyphCacheFromFile(), * @ref exportFontToSingleData() */ @@ -335,8 +341,8 @@ class MAGNUM_TEXT_EXPORT AbstractFontConverter: public PluginManager::AbstractPl * Available only if @ref FontConverterFeature::ImportGlyphCache is * supported. If the plugin has @ref FontConverterFeature::MultiFile, * the function will use additional files in given path, all sharing - * common basename derived from @p filename. Returns imported cache on - * success, @cpp nullptr @ce otherwise. + * common basename derived from @p filename. On failure prints a + * message to @relativeref{Magnum,Error} and returns @cpp nullptr @ce. * @see @ref features(), @ref importGlyphCacheFromData(), * @ref exportGlyphCacheToFile() */ diff --git a/src/Magnum/Trade/AbstractImageConverter.h b/src/Magnum/Trade/AbstractImageConverter.h index 728b87618..8066b08fa 100644 --- a/src/Magnum/Trade/AbstractImageConverter.h +++ b/src/Magnum/Trade/AbstractImageConverter.h @@ -707,10 +707,10 @@ class MAGNUM_TRADE_EXPORT AbstractImageConverter: public PluginManager::Abstract * @m_since_latest * * Available only if @ref ImageConverterFeature::Convert1D is - * supported. Returns converted image on success, - * @ref Containers::NullOpt otherwise. The implementation is allowed to - * return both a compressed an an uncompressed image, see documentation - * of a particular converter for more information. + * supported. On failure prints a message to @relativeref{Magnum,Error} + * and returns @ref Containers::NullOpt. The implementation is allowed + * to return both a compressed an an uncompressed image, see + * documentation of a particular converter for more information. * @see @ref features(), @ref convert(const CompressedImageView1D&), * @ref convert(const ImageData1D&), @ref convertToData(), * @ref convertToFile(), @ref ImageData::isCompressed() @@ -722,10 +722,10 @@ class MAGNUM_TRADE_EXPORT AbstractImageConverter: public PluginManager::Abstract * @m_since_latest * * Available only if @ref ImageConverterFeature::Convert2D is - * supported. Returns converted image on success, - * @ref Containers::NullOpt otherwise. The implementation is allowed to - * return both a compressed an an uncompressed image, see documentation - * of a particular converter for more information. + * supported. On failure prints a message to @relativeref{Magnum,Error} + * and returns @ref Containers::NullOpt. The implementation is allowed + * to return both a compressed an an uncompressed image, see + * documentation of a particular converter for more information. * @see @ref features(), @ref convert(const CompressedImageView2D&), * @ref convert(const ImageData2D&), @ref convertToData(), * @ref convertToFile(), @ref ImageData::isCompressed() @@ -753,10 +753,10 @@ class MAGNUM_TRADE_EXPORT AbstractImageConverter: public PluginManager::Abstract * @m_since_latest * * Available only if @ref ImageConverterFeature::Convert3D is - * supported. Returns converted image on success, - * @ref Containers::NullOpt otherwise. The implementation is allowed to - * return both a compressed an an uncompressed image, see documentation - * of a particular converter for more information. + * supported. On failure prints a message to @relativeref{Magnum,Error} + * and returns @ref Containers::NullOpt. The implementation is allowed + * to return both a compressed an an uncompressed image, see + * documentation of a particular converter for more information. * @see @ref features(), @ref convert(const CompressedImageView3D&), * @ref convert(const ImageData3D&), @ref convertToData(), * @ref convertToFile(), @ref ImageData::isCompressed() @@ -768,10 +768,10 @@ class MAGNUM_TRADE_EXPORT AbstractImageConverter: public PluginManager::Abstract * @m_since_latest * * Available only if @ref ImageConverterFeature::ConvertCompressed1D is - * supported. Returns converted image on success, - * @ref Containers::NullOpt otherwise. The implementation is allowed to - * return both a compressed an an uncompressed image, see documentation - * of a particular converter for more information. + * supported. On failure prints a message to @relativeref{Magnum,Error} + * and returns @ref Containers::NullOpt. The implementation is allowed + * to return both a compressed an an uncompressed image, see + * documentation of a particular converter for more information. * @see @ref features(), @ref convert(const ImageView1D&), * @ref convert(const ImageData1D&), @ref convertToData(), * @ref convertToFile(), @ref ImageData::isCompressed() @@ -783,10 +783,10 @@ class MAGNUM_TRADE_EXPORT AbstractImageConverter: public PluginManager::Abstract * @m_since_latest * * Available only if @ref ImageConverterFeature::ConvertCompressed2D is - * supported. Returns converted image on success, - * @ref Containers::NullOpt otherwise. The implementation is allowed to - * return both a compressed an an uncompressed image, see documentation - * of a particular converter for more information. + * supported. On failure prints a message to @relativeref{Magnum,Error} + * and returns @ref Containers::NullOpt. The implementation is allowed + * to return both a compressed an an uncompressed image, see + * documentation of a particular converter for more information. * @see @ref features(), @ref convert(const ImageView2D&), * @ref convert(const ImageData2D&), @ref convertToData(), * @ref convertToFile(), @ref ImageData::isCompressed() @@ -798,10 +798,10 @@ class MAGNUM_TRADE_EXPORT AbstractImageConverter: public PluginManager::Abstract * @m_since_latest * * Available only if @ref ImageConverterFeature::ConvertCompressed3D is - * supported. Returns converted image on success, - * @ref Containers::NullOpt otherwise. The implementation is allowed to - * return both a compressed an an uncompressed image, see documentation - * of a particular converter for more information. + * supported. On failure prints a message to @relativeref{Magnum,Error} + * and returns @ref Containers::NullOpt. The implementation is allowed + * to return both a compressed an an uncompressed image, see + * documentation of a particular converter for more information. * @see @ref features(), @ref convert(const ImageView3D&), * @ref convert(const ImageData3D&), @ref convertToData(), * @ref convertToFile(), @ref ImageData::isCompressed() @@ -863,7 +863,8 @@ class MAGNUM_TRADE_EXPORT AbstractImageConverter: public PluginManager::Abstract * Available only if @ref ImageConverterFeature::Convert1DToData or * @ref ImageConverterFeature::ConvertLevels1DToData is supported. The * image view is expected to not be @cpp nullptr @ce and to have a - * non-zero size. Returns data on success, @cpp nullptr @ce otherwise. + * non-zero size. On failure prints a message to + * @relativeref{Magnum,Error} and returns @cpp nullptr @ce. * @see @ref features(), @ref convertToData(const CompressedImageView1D&), * @ref convertToData(const ImageData1D&), @ref convert(), * @ref convertToFile() @@ -877,8 +878,8 @@ class MAGNUM_TRADE_EXPORT AbstractImageConverter: public PluginManager::Abstract * Available only if @ref ImageConverterFeature::Convert2DToData or * @ref ImageConverterFeature::ConvertLevels2DToData is supported. The * image view is expected to not be @cpp nullptr @ce and to have a - * non-zero size in all dimensions. Returns data on success, - * @cpp nullptr @ce otherwise. + * non-zero size in all dimensions. On failure prints a message to + * @relativeref{Magnum,Error} and returns @cpp nullptr @ce. * @see @ref features(), @ref convertToData(const CompressedImageView2D&), * @ref convertToData(const ImageData2D&), @ref convert(), * @ref convertToFile() @@ -901,8 +902,8 @@ class MAGNUM_TRADE_EXPORT AbstractImageConverter: public PluginManager::Abstract * Available only if @ref ImageConverterFeature::Convert3DToData or * @ref ImageConverterFeature::ConvertLevels3DToData is supported. The * image view is expected to not be @cpp nullptr @ce and to have a - * non-zero size in all dimensions. Returns data on success, - * @cpp nullptr @ce otherwise. + * non-zero size in all dimensions. On failure prints a message to + * @relativeref{Magnum,Error} and returns @cpp nullptr @ce. * @see @ref features(), @ref convertToData(const CompressedImageView3D&), * @ref convertToData(const ImageData3D&), @ref convert(), * @ref convertToFile() @@ -916,8 +917,8 @@ class MAGNUM_TRADE_EXPORT AbstractImageConverter: public PluginManager::Abstract * Available only if @ref ImageConverterFeature::ConvertCompressed1DToData * or @ref ImageConverterFeature::ConvertCompressedLevels1DToData is * supported. The image view is expected to not be @cpp nullptr @ce and - * to have a non-zero size. Returns data on success, @cpp nullptr @ce - * otherwise. + * to have a non-zero size. On failure prints a message to + * @relativeref{Magnum,Error} and returns @cpp nullptr @ce. * @see @ref features(), @ref convertToData(const ImageView1D&), * @ref convertToData(const ImageData1D&), @ref convert(), * @ref convertToFile() @@ -931,8 +932,8 @@ class MAGNUM_TRADE_EXPORT AbstractImageConverter: public PluginManager::Abstract * Available only if @ref ImageConverterFeature::ConvertCompressed2DToData * or @ref ImageConverterFeature::ConvertCompressedLevels2DToData is * supported. The image view is expected to not be @cpp nullptr @ce and - * to have a non-zero size in all dimensions. Returns data on success, - * @cpp nullptr @ce otherwise. + * to have a non-zero size in all dimensions. On failure prints a + * message to @relativeref{Magnum,Error} and returns @cpp nullptr @ce. * @see @ref features(), @ref convertToData(const ImageView2D&), * @ref convertToData(const ImageData2D&), @ref convert(), * @ref convertToFile() @@ -955,8 +956,8 @@ class MAGNUM_TRADE_EXPORT AbstractImageConverter: public PluginManager::Abstract * Available only if @ref ImageConverterFeature::ConvertCompressed3DToData * or @ref ImageConverterFeature::ConvertCompressedLevels3DToData is * supported. The image view is expected to not be @cpp nullptr @ce and - * to have a non-zero size in all dimensions. Returns data on success, - * @cpp nullptr @ce otherwise. + * to have a non-zero size in all dimensions. On failure prints a + * message to @relativeref{Magnum,Error} and returns @cpp nullptr @ce. * @see @ref features(), @ref convertToData(const ImageView3D&), * @ref convertToData(const ImageData3D&), @ref convert(), * @ref convertToFile() @@ -1018,8 +1019,8 @@ class MAGNUM_TRADE_EXPORT AbstractImageConverter: public PluginManager::Abstract * non-zero size, and all of them sharing the same pixel format. Note * that certain converters may impose additional size and order * restrictions on the images, see documentation of a particular plugin - * for more information. Returns data on success, @cpp nullptr @ce - * otherwise. + * for more information. On failure prints a message to + * @relativeref{Magnum,Error} and returns @cpp nullptr @ce. * @see @ref features(), @ref convertToData(Containers::ArrayView), * @ref convert(), @ref convertToFile() */ @@ -1037,8 +1038,8 @@ class MAGNUM_TRADE_EXPORT AbstractImageConverter: public PluginManager::Abstract * non-zero size in all dimensions, and all views sharing the same * pixel format. Note that certain converters may impose additional * size and order restrictions on the images, see documentation of a - * particular plugin for more information. Returns data on success, - * @cpp nullptr @ce otherwise. + * particular plugin for more information. On failure prints a message + * to @relativeref{Magnum,Error} and returns @cpp nullptr @ce. * @see @ref features(), @ref convertToData(Containers::ArrayView), * @ref convert(), @ref convertToFile() */ @@ -1056,8 +1057,8 @@ class MAGNUM_TRADE_EXPORT AbstractImageConverter: public PluginManager::Abstract * non-zero size in all dimensions, and all views sharing the same * pixel format. Note that certain converters may impose additional * size and order restrictions on the images, see documentation of a - * particular plugin for more information. Returns data on success, - * @cpp nullptr @ce otherwise. + * particular plugin for more information. On failure prints a message + * to @relativeref{Magnum,Error} and returns @cpp nullptr @ce. * @see @ref features(), @ref convertToData(Containers::ArrayView), * @ref convert(), @ref convertToFile() */ @@ -1075,8 +1076,8 @@ class MAGNUM_TRADE_EXPORT AbstractImageConverter: public PluginManager::Abstract * non-zero size, and all views sharing the same pixel format. Note * that certain converters may impose additional size and order * restrictions on the images, see documentation of a particular plugin - * for more information. Returns data on success, @cpp nullptr @ce - * otherwise. + * for more information. On failure prints a message to + * @relativeref{Magnum,Error} and returns @cpp nullptr @ce. * @see @ref features(), @ref convertToData(Containers::ArrayView), * @ref convert(), @ref convertToFile() */ @@ -1094,8 +1095,8 @@ class MAGNUM_TRADE_EXPORT AbstractImageConverter: public PluginManager::Abstract * non-zero size in all dimensions, and all views sharing the same * pixel format. Note that certain converters may impose additional * size and order restrictions on the images, see documentation of a - * particular plugin for more information. Returns data on success, - * @cpp nullptr @ce otherwise. + * particular plugin for more information. On failure prints a message + * to @relativeref{Magnum,Error} and returns @cpp nullptr @ce. * @see @ref features(), @ref convertToData(Containers::ArrayView), * @ref convert(), @ref convertToFile() */ @@ -1113,8 +1114,8 @@ class MAGNUM_TRADE_EXPORT AbstractImageConverter: public PluginManager::Abstract * non-zero size in all dimensions, and all views sharing the same * pixel format. Note that certain converters may impose additional * size and order restrictions on the images, see documentation of a - * particular plugin for more information. Returns data on success, - * @cpp nullptr @ce otherwise. + * particular plugin for more information. On failure prints a message + * to @relativeref{Magnum,Error} and returns @cpp nullptr @ce. * @see @ref features(), @ref convertToData(Containers::ArrayView), * @ref convert(), @ref convertToFile() */ @@ -1129,7 +1130,8 @@ class MAGNUM_TRADE_EXPORT AbstractImageConverter: public PluginManager::Abstract * Available only if @ref ImageConverterFeature::Convert1DToFile or * @ref ImageConverterFeature::Convert1DToData is supported. The image * view is expected to not be @cpp nullptr @ce and to have a non-zero - * size. Returns @cpp true @ce on success, @cpp false @ce otherwise. + * size. On failure prints a message to @relativeref{Magnum,Error} and + * returns @cpp false @ce. * @see @ref features(), @ref convertToFile(const CompressedImageView1D&, Containers::StringView), * @ref convertToFile(const ImageData1D&, Containers::StringView), * @ref convert(), @ref convertToData() @@ -1168,7 +1170,8 @@ class MAGNUM_TRADE_EXPORT AbstractImageConverter: public PluginManager::Abstract * Available only if @ref ImageConverterFeature::Convert3DToFile or * @ref ImageConverterFeature::Convert3DToData is supported. The image * view is expected to not be @cpp nullptr @ce and to have a non-zero - * size. Returns @cpp true @ce on success, @cpp false @ce otherwise. + * size. On failure prints a message to @relativeref{Magnum,Error} and + * returns @cpp false @ce. * @see @ref features(), @ref convertToFile(const CompressedImageView3D&, Containers::StringView), * @ref convertToFile(const ImageData3D&, Containers::StringView), * @ref convert(), @ref convertToData() @@ -1182,8 +1185,8 @@ class MAGNUM_TRADE_EXPORT AbstractImageConverter: public PluginManager::Abstract * Available only if @ref ImageConverterFeature::ConvertCompressed1DToFile * or @ref ImageConverterFeature::ConvertCompressed1DToData is * supported. The image view is expected to not be @cpp nullptr @ce and - * to have a non-zero size in all dimensions. Returns @cpp true @ce on - * success, @cpp false @ce otherwise. + * to have a non-zero size in all dimensions. On failure prints a + * message to @relativeref{Magnum,Error} and returns @cpp false @ce. * @see @ref features(), @ref convertToFile(const ImageView1D&, Containers::StringView), * @ref convertToFile(const ImageData1D&, Containers::StringView), * @ref convert(), @ref convertToData() @@ -1197,8 +1200,8 @@ class MAGNUM_TRADE_EXPORT AbstractImageConverter: public PluginManager::Abstract * Available only if @ref ImageConverterFeature::ConvertCompressed2DToFile * or @ref ImageConverterFeature::ConvertCompressed2DToData is * supported. The image view is expected to not be @cpp nullptr @ce and - * to have a non-zero size in all dimensions. Returns @cpp true @ce on - * success, @cpp false @ce otherwise. + * to have a non-zero size in all dimensions. On failure prints a + * message to @relativeref{Magnum,Error} and returns @cpp false @ce. * @see @ref features(), @ref convertToFile(const ImageView2D&, Containers::StringView), * @ref convertToFile(const ImageData2D&, Containers::StringView), * @ref convert(), @ref convertToData() @@ -1222,8 +1225,8 @@ class MAGNUM_TRADE_EXPORT AbstractImageConverter: public PluginManager::Abstract * Available only if @ref ImageConverterFeature::ConvertCompressed3DToFile * or @ref ImageConverterFeature::ConvertCompressed3DToData is * supported. The image view is expected to not be @cpp nullptr @ce and - * to have a non-zero size in all dimensions. Returns @cpp true @ce on - * success, @cpp false @ce otherwise. + * to have a non-zero size in all dimensions. On failure prints a + * message to @relativeref{Magnum,Error} and returns @cpp false @ce. * @see @ref features(), @ref convertToFile(const ImageView3D&, Containers::StringView), * @ref convertToFile(const ImageData3D&, Containers::StringView), * @ref convert(), @ref convertToData() @@ -1298,8 +1301,8 @@ class MAGNUM_TRADE_EXPORT AbstractImageConverter: public PluginManager::Abstract * non-zero size, and all views sharing the same pixel format. Note * that certain converters may impose additional size and order * restrictions on the images, see documentation of a particular plugin - * for more information. Returns @cpp true @ce on success, - * @cpp false @ce otherwise. + * for more information. On failure prints a message to + * @relativeref{Magnum,Error} and returns @cpp false @ce. * @see @ref features(), @ref convertToFile(Containers::ArrayView, Containers::StringView), * @ref convert(), @ref convertToData() */ @@ -1317,8 +1320,8 @@ class MAGNUM_TRADE_EXPORT AbstractImageConverter: public PluginManager::Abstract * non-zero size in all dimensions, and all views sharing the same * pixel format. Note that certain converters may impose additional * size and order restrictions on the images, see documentation of a - * particular plugin for more information. Returns @cpp true @ce on - * success, @cpp false @ce otherwise. + * particular plugin for more information. On failure prints a message + * to @relativeref{Magnum,Error} and returns @cpp false @ce. * @see @ref features(), @ref convertToFile(Containers::ArrayView, Containers::StringView), * @ref convert(), @ref convertToData() */ @@ -1336,8 +1339,8 @@ class MAGNUM_TRADE_EXPORT AbstractImageConverter: public PluginManager::Abstract * non-zero size in all dimensions, and all views sharing the same * pixel format. Note that certain converters may impose additional * size and order restrictions on the images, see documentation of a - * particular plugin for more information. Returns @cpp true @ce on - * success, @cpp false @ce otherwise. + * particular plugin for more information. On failure prints a message + * to @relativeref{Magnum,Error} and returns @cpp false @ce. * @see @ref features(), @ref convertToFile(Containers::ArrayView, Containers::StringView), * @ref convert(), @ref convertToData() */ @@ -1355,8 +1358,8 @@ class MAGNUM_TRADE_EXPORT AbstractImageConverter: public PluginManager::Abstract * non-zero size, and all views sharing the same pixel format. Note * that certain converters may impose additional size and order * restrictions on the images, see documentation of a particular plugin - * for more information. Returns @cpp true @ce on success, - * @cpp false @ce otherwise. + * for more information. On failure prints a message to + * @relativeref{Magnum,Error} and returns @cpp false @ce. * @see @ref features(), @ref convertToFile(Containers::ArrayView, Containers::StringView), * @ref convert(), @ref convertToData() */ @@ -1374,8 +1377,8 @@ class MAGNUM_TRADE_EXPORT AbstractImageConverter: public PluginManager::Abstract * non-zero size in all dimensions, and all views sharing the same * pixel format. Note that certain converters may impose additional * size and order restrictions on the images, see documentation of a - * particular plugin for more information. Returns @cpp true @ce on - * success, @cpp false @ce otherwise. + * particular plugin for more information. On failure prints a message + * to @relativeref{Magnum,Error} and returns @cpp false @ce. * @see @ref features(), @ref convertToFile(Containers::ArrayView, Containers::StringView), * @ref convert(), @ref convertToData() */ @@ -1393,8 +1396,8 @@ class MAGNUM_TRADE_EXPORT AbstractImageConverter: public PluginManager::Abstract * non-zero size in all dimensions, and all views sharing the same * pixel format. Note that certain converters may impose additional * size and order restrictions on the images, see documentation of a - * particular plugin for more information. Returns @cpp true @ce on - * success, @cpp false @ce otherwise. + * particular plugin for more information. On failure prints a message + * to @relativeref{Magnum,Error} and returns @cpp false @ce. * @see @ref features(), @ref convertToFile(Containers::ArrayView, Containers::StringView), * @ref convert(), @ref convertToData() */ diff --git a/src/Magnum/Trade/AbstractImporter.h b/src/Magnum/Trade/AbstractImporter.h index b0f9f99cb..89e4fadde 100644 --- a/src/Magnum/Trade/AbstractImporter.h +++ b/src/Magnum/Trade/AbstractImporter.h @@ -634,7 +634,8 @@ class MAGNUM_TRADE_EXPORT AbstractImporter: public PluginManager::AbstractManagi * * Closes previous file, if it was opened, and tries to open given raw * data. Available only if @ref ImporterFeature::OpenData is supported. - * Returns @cpp true @ce on success, @cpp false @ce otherwise. + * On failure prints a message to @relativeref{Magnum,Error} and + * returns @cpp false @ce. * * The @p data is not expected to be alive after the function exits. * Using @ref openMemory() instead as can avoid unnecessary copies in @@ -649,7 +650,8 @@ class MAGNUM_TRADE_EXPORT AbstractImporter: public PluginManager::AbstractManagi * * Closes previous file, if it was opened, and tries to open given raw * data. Available only if @ref ImporterFeature::OpenData is supported. - * Returns @cpp true @ce on success, @cpp false @ce otherwise. + * On failure prints a message to @relativeref{Magnum,Error} and + * returns @cpp false @ce. * * Unlike @ref openData(), this function expects @p memory to stay in * scope until the importer is destructed, @ref close() is called or @@ -668,8 +670,8 @@ class MAGNUM_TRADE_EXPORT AbstractImporter: public PluginManager::AbstractManagi * * Closes previous file, if it was opened, and tries to open given * state. Available only if @ref ImporterFeature::OpenState is - * supported. Returns @cpp true @ce on success, @cpp false @ce - * otherwise. + * supported. On failure prints a message to @relativeref{Magnum,Error} + * and returns @cpp false @ce. * * See documentation of a particular plugin for more information about * type and contents of the @p state parameter. @@ -687,12 +689,12 @@ class MAGNUM_TRADE_EXPORT AbstractImporter: public PluginManager::AbstractManagi * @brief Open a file * * Closes previous file, if it was opened, and tries to open given - * file. Returns @cpp true @ce on success, @cpp false @ce otherwise. - * If file loading callbacks are set via @ref setFileCallback() and - * @ref ImporterFeature::OpenData is supported, this function uses the - * callback to load the file and passes the memory view to - * @ref openData() instead. See @ref setFileCallback() for more - * information. + * file. On failure prints a message to @relativeref{Magnum,Error} and + * returns @cpp false @ce. If file loading callbacks are set via + * @ref setFileCallback() and @ref ImporterFeature::OpenData is + * supported, this function uses the callback to load the file and + * passes the memory view to @ref openData() instead. See + * @ref setFileCallback() for more information. * @see @ref features(), @ref openData(), @ref openMemory(), * @ref openState() */ @@ -784,8 +786,8 @@ class MAGNUM_TRADE_EXPORT AbstractImporter: public PluginManager::AbstractManagi * @brief Scene * @param id Scene ID, from range [0, @ref sceneCount()). * - * Returns given scene or @ref Containers::NullOpt if import failed. - * Expects that a file is opened. + * On failure prints a message to @relativeref{Magnum,Error} and + * returns @ref Containers::NullOpt. Expects that a file is opened. * @see @ref scene(Containers::StringView) */ Containers::Optional scene(UnsignedInt id); @@ -796,9 +798,9 @@ class MAGNUM_TRADE_EXPORT AbstractImporter: public PluginManager::AbstractManagi * * A convenience API combining @ref sceneForName() and * @ref scene(UnsignedInt). If @ref sceneForName() returns @cpp -1 @ce, - * prints an error message and returns @ref Containers::NullOpt, - * otherwise propagates the result from @ref scene(UnsignedInt). - * Expects that a file is opened. + * prints a message to @relativeref{Magnum,Error} and returns + * @ref Containers::NullOpt, otherwise propagates the result from + * @ref scene(UnsignedInt). Expects that a file is opened. */ Containers::Optional scene(Containers::StringView name); @@ -861,8 +863,8 @@ class MAGNUM_TRADE_EXPORT AbstractImporter: public PluginManager::AbstractManagi * @brief Animation * @param id Animation ID, from range [0, @ref animationCount()). * - * Returns given animation or @ref Containers::NullOpt if importing - * failed. Expects that a file is opened. + * On failure prints a message to @relativeref{Magnum,Error} and + * returns @ref Containers::NullOpt. Expects that a file is opened. * @see @ref animation(Containers::StringView) */ Containers::Optional animation(UnsignedInt id); @@ -873,9 +875,9 @@ class MAGNUM_TRADE_EXPORT AbstractImporter: public PluginManager::AbstractManagi * * A convenience API combining @ref animationForName() and * @ref animation(UnsignedInt). If @ref animationForName() returns - * @cpp -1 @ce, prints an error message and returns - * @ref Containers::NullOpt, otherwise propagates the result from - * @ref animation(UnsignedInt). Expects that a file is opened. + * @cpp -1 @ce, prints a message to @relativeref{Magnum,Error} and + * returns @ref Containers::NullOpt, otherwise propagates the result + * from @ref animation(UnsignedInt). Expects that a file is opened. */ Containers::Optional animation(Containers::StringView name); @@ -910,8 +912,8 @@ class MAGNUM_TRADE_EXPORT AbstractImporter: public PluginManager::AbstractManagi * @brief Light * @param id Light ID, from range [0, @ref lightCount()). * - * Returns given light or @ref Containers::NullOpt if importing failed. - * Expects that a file is opened. + * On failure prints a message to @relativeref{Magnum,Error} and + * returns @ref Containers::NullOpt. Expects that a file is opened. * @see @ref light(Containers::StringView) */ Containers::Optional light(UnsignedInt id); @@ -922,9 +924,9 @@ class MAGNUM_TRADE_EXPORT AbstractImporter: public PluginManager::AbstractManagi * * A convenience API combining @ref lightForName() and * @ref light(UnsignedInt). If @ref lightForName() returns @cpp -1 @ce, - * prints an error message and returns @ref Containers::NullOpt, - * otherwise propagates the result from @ref light(UnsignedInt). - * Expects that a file is opened. + * prints a message to @relativeref{Magnum,Error} and returns + * @ref Containers::NullOpt, otherwise propagates the result from + * @ref light(UnsignedInt). Expects that a file is opened. */ Containers::Optional light(Containers::StringView name); @@ -959,8 +961,8 @@ class MAGNUM_TRADE_EXPORT AbstractImporter: public PluginManager::AbstractManagi * @brief Camera * @param id Camera ID, from range [0, @ref cameraCount()). * - * Returns given camera or @ref Containers::NullOpt if importing - * failed. Expects that a file is opened. + * On failure prints a message to @relativeref{Magnum,Error} and + * returns @ref Containers::NullOpt. Expects that a file is opened. * @see @ref camera(Containers::StringView) */ Containers::Optional camera(UnsignedInt id); @@ -971,9 +973,9 @@ class MAGNUM_TRADE_EXPORT AbstractImporter: public PluginManager::AbstractManagi * * A convenience API combining @ref cameraForName() and * @ref camera(UnsignedInt). If @ref cameraForName() returns - * @cpp -1 @ce, prints an error message and returns - * @ref Containers::NullOpt, otherwise propagates the result from - * @ref camera(UnsignedInt). Expects that a file is opened. + * @cpp -1 @ce, prints a message to @relativeref{Magnum,Error} and + * returns @ref Containers::NullOpt, otherwise propagates the result + * from @ref camera(UnsignedInt). Expects that a file is opened. */ Containers::Optional camera(Containers::StringView name); @@ -1144,8 +1146,8 @@ class MAGNUM_TRADE_EXPORT AbstractImporter: public PluginManager::AbstractManagi * @param id Skin ID, from range [0, @ref skin2DCount()). * @m_since_latest * - * Returns given skin or @ref Containers::NullOpt if importing failed. - * Expects that a file is opened. + * On failure prints a message to @relativeref{Magnum,Error} and + * returns @ref Containers::NullOpt. Expects that a file is opened. * @see @ref skin2D(Containers::StringView) */ Containers::Optional skin2D(UnsignedInt id); @@ -1156,9 +1158,9 @@ class MAGNUM_TRADE_EXPORT AbstractImporter: public PluginManager::AbstractManagi * * A convenience API combining @ref skin2DForName() and * @ref skin2D(UnsignedInt). If @ref skin2DForName() returns - * @cpp -1 @ce, prints an error message and returns - * @ref Containers::NullOpt, otherwise propagates the result from - * @ref skin2D(UnsignedInt). Expects that a file is opened. + * @cpp -1 @ce, prints a message to @relativeref{Magnum,Error} and + * returns @ref Containers::NullOpt, otherwise propagates the result + * from @ref skin2D(UnsignedInt). Expects that a file is opened. */ Containers::Optional skin2D(Containers::StringView name); @@ -1197,8 +1199,8 @@ class MAGNUM_TRADE_EXPORT AbstractImporter: public PluginManager::AbstractManagi * @param id Skin ID, from range [0, @ref skin3DCount()). * @m_since_latest * - * Returns given skin or @ref Containers::NullOpt if importing failed. - * Expects that a file is opened. + * On failure prints a message to @relativeref{Magnum,Error} and + * returns @ref Containers::NullOpt. Expects that a file is opened. * @see @ref skin3D(Containers::StringView) */ Containers::Optional skin3D(UnsignedInt id); @@ -1209,9 +1211,9 @@ class MAGNUM_TRADE_EXPORT AbstractImporter: public PluginManager::AbstractManagi * * A convenience API combining @ref skin3DForName() and * @ref skin3D(UnsignedInt). If @ref skin3DForName() returns - * @cpp -1 @ce, prints an error message and returns - * @ref Containers::NullOpt, otherwise propagates the result from - * @ref skin3D(UnsignedInt). Expects that a file is opened. + * @cpp -1 @ce, prints a message to @relativeref{Magnum,Error} and + * returns @ref Containers::NullOpt, otherwise propagates the result + * from @ref skin3D(UnsignedInt). Expects that a file is opened. */ Containers::Optional skin3D(Containers::StringView name); @@ -1262,11 +1264,11 @@ class MAGNUM_TRADE_EXPORT AbstractImporter: public PluginManager::AbstractManagi * @param level Mesh level, from range [0, @ref meshLevelCount()) * @m_since{2020,06} * - * Returns given mesh or @ref Containers::NullOpt if importing failed. - * The @p level parameter allows access to additional data and is - * largely left as importer-specific --- for example allowing access to - * per-instance, per-face or per-edge data. Expects that a file is - * opened. + * On failure prints a message to @relativeref{Magnum,Error} and + * returns @ref Containers::NullOpt. The @p level parameter allows + * access to additional data and is largely left as importer-specific + * --- for example allowing access to per-instance, per-face or + * per-edge data. Expects that a file is opened. * @see @ref mesh(Containers::StringView, UnsignedInt), * @ref MeshPrimitive::Instances, @ref MeshPrimitive::Faces, * @ref MeshPrimitive::Edges @@ -1279,9 +1281,10 @@ class MAGNUM_TRADE_EXPORT AbstractImporter: public PluginManager::AbstractManagi * * A convenience API combining @ref meshForName() and * @ref mesh(UnsignedInt, UnsignedInt). If @ref meshForName() returns - * @cpp -1 @ce, prints an error message and returns - * @ref Containers::NullOpt, otherwise propagates the result from - * @ref mesh(UnsignedInt, UnsignedInt). Expects that a file is opened. + * @cpp -1 @ce, prints a message to @relativeref{Magnum,Error} and + * returns @ref Containers::NullOpt, otherwise propagates the result + * from @ref mesh(UnsignedInt, UnsignedInt). Expects that a file is + * opened. */ Containers::Optional mesh(Containers::StringView name, UnsignedInt level = 0); @@ -1426,8 +1429,8 @@ class MAGNUM_TRADE_EXPORT AbstractImporter: public PluginManager::AbstractManagi * @brief Material * @param id Material ID, from range [0, @ref materialCount()). * - * Returns given material or @ref Containers::NullOpt if importing - * failed. Expects that a file is opened. + * On failure prints a message to @relativeref{Magnum,Error} and + * returns @ref Containers::NullOpt. Expects that a file is opened. * @see @ref material(Containers::StringView) */ #if !defined(MAGNUM_BUILD_DEPRECATED) || defined(DOXYGEN_GENERATING_OUTPUT) @@ -1443,9 +1446,9 @@ class MAGNUM_TRADE_EXPORT AbstractImporter: public PluginManager::AbstractManagi * * A convenience API combining @ref materialForName() and * @ref material(UnsignedInt). If @ref materialForName() returns - * @cpp -1 @ce, prints an error message and returns - * @ref Containers::NullOpt, otherwise propagates the result from - * @ref material(UnsignedInt). Expects that a file is opened. + * @cpp -1 @ce, prints a message to @relativeref{Magnum,Error} and + * returns @ref Containers::NullOpt, otherwise propagates the result + * from @ref material(UnsignedInt). Expects that a file is opened. */ #if !defined(MAGNUM_BUILD_DEPRECATED) || defined(DOXYGEN_GENERATING_OUTPUT) Containers::Optional @@ -1485,8 +1488,8 @@ class MAGNUM_TRADE_EXPORT AbstractImporter: public PluginManager::AbstractManagi * @brief Texture * @param id Texture ID, from range [0, @ref textureCount()). * - * Returns given texture or @ref Containers::NullOpt if importing - * failed. Expects that a file is opened. + * On failure prints a message to @relativeref{Magnum,Error} and + * returns @ref Containers::NullOpt. Expects that a file is opened. * @see @ref texture(Containers::StringView) */ Containers::Optional texture(UnsignedInt id); @@ -1497,9 +1500,9 @@ class MAGNUM_TRADE_EXPORT AbstractImporter: public PluginManager::AbstractManagi * * A convenience API combining @ref textureForName() and * @ref texture(UnsignedInt). If @ref textureForName() returns - * @cpp -1 @ce, prints an error message and returns - * @ref Containers::NullOpt, otherwise propagates the result from - * @ref texture(UnsignedInt). Expects that a file is opened. + * @cpp -1 @ce, prints a message to @relativeref{Magnum,Error} and + * returns @ref Containers::NullOpt, otherwise propagates the result + * from @ref texture(UnsignedInt). Expects that a file is opened. */ Containers::Optional texture(Containers::StringView name); @@ -1546,8 +1549,8 @@ class MAGNUM_TRADE_EXPORT AbstractImporter: public PluginManager::AbstractManagi * @param id Image ID, from range [0, @ref image1DCount()). * @param level Mip level, from range [0, @ref image1DLevelCount()) * - * Returns given image or @ref Containers::NullOpt if importing failed. - * Expects that a file is opened. + * On failure prints a message to @relativeref{Magnum,Error} and + * returns @ref Containers::NullOpt. Expects that a file is opened. * @see @ref image1D(Containers::StringView, UnsignedInt) */ Containers::Optional image1D(UnsignedInt id, UnsignedInt level = 0); @@ -1558,10 +1561,10 @@ class MAGNUM_TRADE_EXPORT AbstractImporter: public PluginManager::AbstractManagi * * A convenience API combining @ref image1DForName() and * @ref image1D(UnsignedInt, UnsignedInt). If @ref image1DForName() - * returns @cpp -1 @ce, prints an error message and returns - * @ref Containers::NullOpt, otherwise propagates the result from - * @ref image1D(UnsignedInt, UnsignedInt). Expects that a file is - * opened. + * returns @cpp -1 @ce, prints a message to @relativeref{Magnum,Error} + * and returns @ref Containers::NullOpt, otherwise propagates the + * result from @ref image1D(UnsignedInt, UnsignedInt). Expects that a + * file is opened. */ Containers::Optional image1D(Containers::StringView name, UnsignedInt level = 0); @@ -1608,8 +1611,8 @@ class MAGNUM_TRADE_EXPORT AbstractImporter: public PluginManager::AbstractManagi * @param id Image ID, from range [0, @ref image2DCount()). * @param level Mip level, from range [0, @ref image2DLevelCount()) * - * Returns given image or @ref Containers::NullOpt if importing failed. - * Expects that a file is opened. + * On failure prints a message to @relativeref{Magnum,Error} and + * returns @ref Containers::NullOpt. Expects that a file is opened. * @see @ref image2D(Containers::StringView, UnsignedInt) */ Containers::Optional image2D(UnsignedInt id, UnsignedInt level = 0); @@ -1620,10 +1623,10 @@ class MAGNUM_TRADE_EXPORT AbstractImporter: public PluginManager::AbstractManagi * * A convenience API combining @ref image2DForName() and * @ref image2D(UnsignedInt, UnsignedInt). If @ref image2DForName() - * returns @cpp -1 @ce, prints an error message and returns - * @ref Containers::NullOpt, otherwise propagates the result from - * @ref image2D(UnsignedInt, UnsignedInt). Expects that a file is - * opened. + * returns @cpp -1 @ce, prints a message to @relativeref{Magnum,Error} + * and returns @ref Containers::NullOpt, otherwise propagates the + * result from @ref image2D(UnsignedInt, UnsignedInt). Expects that a + * file is opened. */ Containers::Optional image2D(Containers::StringView name, UnsignedInt level = 0); @@ -1670,8 +1673,8 @@ class MAGNUM_TRADE_EXPORT AbstractImporter: public PluginManager::AbstractManagi * @param id Image ID, from range [0, @ref image3DCount()). * @param level Mip level, from range [0, @ref image3DLevelCount()) * - * Returns given image or @ref Containers::NullOpt if importing failed. - * Expects that a file is opened. + * On failure prints a message to @relativeref{Magnum,Error} and + * returns @ref Containers::NullOpt. Expects that a file is opened. * @see @ref image3D(Containers::StringView, UnsignedInt) */ Containers::Optional image3D(UnsignedInt id, UnsignedInt level = 0); @@ -1682,10 +1685,10 @@ class MAGNUM_TRADE_EXPORT AbstractImporter: public PluginManager::AbstractManagi * * A convenience API combining @ref image3DForName() and * @ref image3D(UnsignedInt, UnsignedInt). If @ref image3DForName() - * returns @cpp -1 @ce, prints an error message and returns - * @ref Containers::NullOpt, otherwise propagates the result from - * @ref image3D(UnsignedInt, UnsignedInt). Expects that a file is - * opened. + * returns @cpp -1 @ce, prints a message to @relativeref{Magnum,Error} + * and returns @ref Containers::NullOpt, otherwise propagates the + * result from @ref image3D(UnsignedInt, UnsignedInt). Expects that a + * file is opened. */ Containers::Optional image3D(Containers::StringView name, UnsignedInt level = 0); diff --git a/src/Magnum/Trade/AbstractSceneConverter.h b/src/Magnum/Trade/AbstractSceneConverter.h index fba0a3f26..cb3f46d97 100644 --- a/src/Magnum/Trade/AbstractSceneConverter.h +++ b/src/Magnum/Trade/AbstractSceneConverter.h @@ -355,7 +355,8 @@ class MAGNUM_TRADE_EXPORT AbstractSceneConverter: public PluginManager::Abstract * Depending on the plugin, can perform for example vertex format * conversion, overdraw optimization or decimation / subdivision. * Available only if @ref SceneConverterFeature::ConvertMesh is - * supported. + * supported. On failure prints a message to @relativeref{Magnum,Error} + * and returns @ref Containers::NullOpt. * @see @ref features(), @ref convertInPlace(MeshData&) */ Containers::Optional convert(const MeshData& mesh); @@ -366,9 +367,8 @@ class MAGNUM_TRADE_EXPORT AbstractSceneConverter: public PluginManager::Abstract * Depending on the plugin, can perform for example index buffer * reordering for better vertex cache use or overdraw optimization. * Available only if @ref SceneConverterFeature::ConvertMeshInPlace is - * supported. Returns @cpp true @ce if the operation succeeded. On - * failure the function prints an error message and returns - * @cpp false @ce, @p mesh is guaranteed to stay unchanged. + * supported. On failure prints a message to @relativeref{Magnum,Error} + * and returns @cpp false @ce, @p mesh is guaranteed to stay unchanged. * @see @ref features(), @ref convert(const MeshData&) */ bool convertInPlace(MeshData& mesh); @@ -379,7 +379,7 @@ class MAGNUM_TRADE_EXPORT AbstractSceneConverter: public PluginManager::Abstract * Depending on the plugin, can convert the mesh to a file format that * can be saved to disk. Available only if * @ref SceneConverterFeature::ConvertMeshToData is supported. On - * failure the function prints an error message and returns + * failure prints a message to @relativeref{Magnum,Error} and returns * @cpp nullptr @ce. * @see @ref features(), @ref convertToFile() */ @@ -390,9 +390,9 @@ class MAGNUM_TRADE_EXPORT AbstractSceneConverter: public PluginManager::Abstract * @m_since_latest * * Available only if @ref SceneConverterFeature::ConvertMeshToFile or - * @ref SceneConverterFeature::ConvertMeshToData is supported. Returns - * @cpp true @ce on success, prints an error message and returns - * @cpp false @ce otherwise. + * @ref SceneConverterFeature::ConvertMeshToData is supported. On + * failure prints a message to @relativeref{Magnum,Error} and returns + * @cpp false @ce. * @see @ref features(), @ref convertToData() */ bool convertToFile(const MeshData& mesh, Containers::StringView filename);