From f1a3602cb3ef2c9d753be67ccd2ed62b0a71c4d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Mon, 2 Mar 2015 00:31:01 +0100 Subject: [PATCH] Trade: make it possible to call default doOpenFile() implementation. --- src/Magnum/Trade/AbstractImporter.h | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/Magnum/Trade/AbstractImporter.h b/src/Magnum/Trade/AbstractImporter.h index f5172d863..f194cb7ad 100644 --- a/src/Magnum/Trade/AbstractImporter.h +++ b/src/Magnum/Trade/AbstractImporter.h @@ -471,6 +471,17 @@ class MAGNUM_EXPORT AbstractImporter: public PluginManager::AbstractManagingPlug /*@}*/ + protected: + /** + * @brief Implementation for @ref openFile() + * + * If @ref Feature::OpenData is supported, default implementation opens + * the file and calls @ref doOpenData() with its contents. It is + * allowed to call this function from your @ref doOpenFile() + * implementation. + */ + virtual void doOpenFile(const std::string& filename); + #ifndef DOXYGEN_GENERATING_OUTPUT private: #else @@ -485,14 +496,6 @@ class MAGNUM_EXPORT AbstractImporter: public PluginManager::AbstractManagingPlug /** @brief Implementation for @ref openData() */ virtual void doOpenData(Containers::ArrayReference data); - /** - * @brief Implementation for @ref openFile() - * - * If @ref Feature::OpenData is supported, default implementation opens - * the file and calls @ref doOpenData() with its contents. - */ - virtual void doOpenFile(const std::string& filename); - /** @brief Implementation for @ref close() */ virtual void doClose() = 0;