From 10d5894e505cac6e118b6fe1cd368a8f20eb90a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sat, 6 Jul 2019 13:10:36 +0200 Subject: [PATCH] Trade: doc++ --- src/Magnum/Trade/AbstractImporter.h | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/Magnum/Trade/AbstractImporter.h b/src/Magnum/Trade/AbstractImporter.h index b9050368f..b41d1b6af 100644 --- a/src/Magnum/Trade/AbstractImporter.h +++ b/src/Magnum/Trade/AbstractImporter.h @@ -360,7 +360,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 Feature::OpenData is supported. Returns - * @cpp true @ce on success, @cpp false @ce otherwise. + * @cpp true @ce on success, @cpp false @ce otherwise. The @p data is + * not expected to be alive after the function exits. * @see @ref features(), @ref openFile() */ bool openData(Containers::ArrayView data); @@ -382,7 +383,7 @@ class MAGNUM_TRADE_EXPORT AbstractImporter: public PluginManager::AbstractManagi bool openState(const void* state, const std::string& filePath = {}); /** - * @brief Open file + * @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. @@ -394,7 +395,13 @@ class MAGNUM_TRADE_EXPORT AbstractImporter: public PluginManager::AbstractManagi */ bool openFile(const std::string& filename); - /** @brief Close file */ + /** + * @brief Close currently opened file + * + * On particular implementations an explicit call to this function may + * result in freed memory. This call is also done automatically when + * the importer gets destructed or when another file is opened. + */ void close(); /** @{ @name Data accessors