Browse Source

Adapt to Corrade PluginManager changes.

pull/556/head
Vladimír Vondruš 4 years ago
parent
commit
13d04fdc38
  1. 1
      doc/snippets/MagnumShaderTools.cpp
  2. 31
      src/Magnum/Audio/AbstractImporter.cpp
  3. 15
      src/Magnum/Audio/AbstractImporter.h
  4. 6
      src/Magnum/Audio/configure.h.cmake
  5. 6
      src/Magnum/SceneTools/sceneconverter.cpp
  6. 28
      src/Magnum/ShaderTools/AbstractConverter.cpp
  7. 15
      src/Magnum/ShaderTools/AbstractConverter.h
  8. 6
      src/Magnum/ShaderTools/configure.h.cmake
  9. 3
      src/Magnum/ShaderTools/shaderconverter.cpp
  10. 31
      src/Magnum/Text/AbstractFont.cpp
  11. 15
      src/Magnum/Text/AbstractFont.h
  12. 29
      src/Magnum/Text/AbstractFontConverter.cpp
  13. 15
      src/Magnum/Text/AbstractFontConverter.h
  14. 10
      src/Magnum/Text/configure.h.cmake
  15. 27
      src/Magnum/Trade/AbstractImageConverter.cpp
  16. 15
      src/Magnum/Trade/AbstractImageConverter.h
  17. 31
      src/Magnum/Trade/AbstractImporter.cpp
  18. 16
      src/Magnum/Trade/AbstractImporter.h
  19. 33
      src/Magnum/Trade/AbstractSceneConverter.cpp
  20. 15
      src/Magnum/Trade/AbstractSceneConverter.h
  21. 14
      src/Magnum/Trade/configure.h.cmake
  22. 5
      src/Magnum/Trade/imageconverter.cpp
  23. 2
      src/MagnumPlugins/ObjImporter/ObjImporter.cpp
  24. 2
      src/MagnumPlugins/ObjImporter/ObjImporter.h
  25. 1
      src/MagnumPlugins/TgaImageConverter/Test/TgaImageConverterTest.cpp
  26. 2
      src/MagnumPlugins/TgaImageConverter/TgaImageConverter.cpp
  27. 2
      src/MagnumPlugins/TgaImageConverter/TgaImageConverter.h
  28. 2
      src/MagnumPlugins/TgaImporter/TgaImporter.cpp
  29. 2
      src/MagnumPlugins/TgaImporter/TgaImporter.h
  30. 2
      src/MagnumPlugins/WavAudioImporter/WavImporter.cpp
  31. 2
      src/MagnumPlugins/WavAudioImporter/WavImporter.h

1
doc/snippets/MagnumShaderTools.cpp

@ -23,6 +23,7 @@
DEALINGS IN THE SOFTWARE.
*/
#include <string> /** @todo drop when file callbacks are <string>-free */
#include <unordered_map>
#include <Corrade/Containers/Array.h>
#include <Corrade/Containers/Optional.h>

31
src/Magnum/Audio/AbstractImporter.cpp

@ -29,27 +29,44 @@
#include <Corrade/Containers/EnumSet.hpp>
#include <Corrade/Containers/Optional.h>
#include <Corrade/Containers/String.h>
#include <Corrade/Containers/StringStl.h> /** @todo remove once PluginManager is <string>-free */
#include <Corrade/Containers/StringStl.h> /** @todo remove once AbstractImporter is <string>-free */
#include <Corrade/PluginManager/Manager.hpp>
#include <Corrade/Utility/Assert.h>
#include <Corrade/Utility/DebugStl.h>
#include <Corrade/Utility/DebugStl.h> /** @todo remove once AbstractImporter is <string>-free */
#include <Corrade/Utility/Path.h>
#ifndef CORRADE_PLUGINMANAGER_NO_DYNAMIC_PLUGIN_SUPPORT
#include "Magnum/Audio/configure.h"
#endif
namespace Corrade { namespace PluginManager {
/* On non-MinGW Windows the instantiations are already marked with extern
template. However Clang-CL doesn't propagate the export from the extern
template, it seems. */
#if !defined(CORRADE_TARGET_WINDOWS) || defined(CORRADE_TARGET_MINGW) || defined(CORRADE_TARGET_CLANG_CL)
#define MAGNUM_AUDIO_EXPORT_HPP MAGNUM_AUDIO_EXPORT
#else
#define MAGNUM_AUDIO_EXPORT_HPP
#endif
template class MAGNUM_AUDIO_EXPORT_HPP Manager<Magnum::Audio::AbstractImporter>;
}}
namespace Magnum { namespace Audio {
std::string AbstractImporter::pluginInterface() {
using namespace Containers::Literals;
Containers::StringView AbstractImporter::pluginInterface() {
return
/* [interface] */
"cz.mosra.magnum.Audio.AbstractImporter/0.1"
"cz.mosra.magnum.Audio.AbstractImporter/0.1"_s
/* [interface] */
;
}
#ifndef CORRADE_PLUGINMANAGER_NO_DYNAMIC_PLUGIN_SUPPORT
std::vector<std::string> AbstractImporter::pluginSearchPaths() {
Containers::Array<Containers::String> AbstractImporter::pluginSearchPaths() {
const Containers::Optional<Containers::String> libraryLocation = Utility::Path::libraryLocation(&pluginInterface);
return PluginManager::implicitPluginSearchPaths(
#ifndef MAGNUM_BUILD_STATIC
@ -67,7 +84,7 @@ std::vector<std::string> AbstractImporter::pluginSearchPaths() {
#else
"magnum/"
#endif
"audioimporters");
"audioimporters"_s);
}
#endif
@ -75,7 +92,7 @@ AbstractImporter::AbstractImporter() = default;
AbstractImporter::AbstractImporter(PluginManager::Manager<AbstractImporter>& manager): PluginManager::AbstractManagingPlugin<AbstractImporter>{manager} {}
AbstractImporter::AbstractImporter(PluginManager::AbstractManager& manager, const std::string& plugin): PluginManager::AbstractManagingPlugin<AbstractImporter>{manager, plugin} {}
AbstractImporter::AbstractImporter(PluginManager::AbstractManager& manager, const Containers::StringView& plugin): PluginManager::AbstractManagingPlugin<AbstractImporter>{manager, plugin} {}
bool AbstractImporter::openData(Containers::ArrayView<const void> data) {
CORRADE_ASSERT(features() & ImporterFeature::OpenData,

15
src/Magnum/Audio/AbstractImporter.h

@ -125,7 +125,7 @@ class MAGNUM_AUDIO_EXPORT AbstractImporter: public PluginManager::AbstractManagi
*
* @snippet Magnum/Audio/AbstractImporter.cpp interface
*/
static std::string pluginInterface();
static Containers::StringView pluginInterface();
#ifndef CORRADE_PLUGINMANAGER_NO_DYNAMIC_PLUGIN_SUPPORT
/**
@ -141,7 +141,7 @@ class MAGNUM_AUDIO_EXPORT AbstractImporter: public PluginManager::AbstractManagi
* Not defined on platforms without
* @ref CORRADE_PLUGINMANAGER_NO_DYNAMIC_PLUGIN_SUPPORT "dynamic plugin support".
*/
static std::vector<std::string> pluginSearchPaths();
static Containers::Array<Containers::String> pluginSearchPaths();
#endif
/** @brief Default constructor */
@ -151,7 +151,10 @@ class MAGNUM_AUDIO_EXPORT AbstractImporter: public PluginManager::AbstractManagi
explicit AbstractImporter(PluginManager::Manager<AbstractImporter>& manager);
/** @brief Plugin manager constructor */
explicit AbstractImporter(PluginManager::AbstractManager& manager, const std::string& plugin);
/* The plugin name is passed as a const& to make it possible for people
to implement plugins without even having to include the StringView
header. */
explicit AbstractImporter(PluginManager::AbstractManager& manager, const Containers::StringView& plugin);
/** @brief Features supported by this importer */
ImporterFeatures features() const { return doFeatures(); }
@ -232,4 +235,10 @@ class MAGNUM_AUDIO_EXPORT AbstractImporter: public PluginManager::AbstractManagi
}}
#if defined(CORRADE_TARGET_WINDOWS) && !(defined(CORRADE_TARGET_MINGW) && !defined(CORRADE_TARGET_CLANG))
namespace Corrade { namespace PluginManager {
extern template class MAGNUM_AUDIO_EXPORT Manager<Magnum::Audio::AbstractImporter>;
}}
#endif
#endif

6
src/Magnum/Audio/configure.h.cmake

@ -23,5 +23,7 @@
DEALINGS IN THE SOFTWARE.
*/
#define MAGNUM_PLUGINS_AUDIOIMPORTER_DIR "${MAGNUM_PLUGINS_AUDIOIMPORTER_DIR}"
#define MAGNUM_PLUGINS_AUDIOIMPORTER_DEBUG_DIR "${MAGNUM_PLUGINS_AUDIOIMPORTER_DEBUG_DIR}"
/* StringView literals, so they expect the Literals namespace to be used at the
point of use */
#define MAGNUM_PLUGINS_AUDIOIMPORTER_DIR "${MAGNUM_PLUGINS_AUDIOIMPORTER_DIR}"_s
#define MAGNUM_PLUGINS_AUDIOIMPORTER_DEBUG_DIR "${MAGNUM_PLUGINS_AUDIOIMPORTER_DEBUG_DIR}"_s

6
src/Magnum/SceneTools/sceneconverter.cpp

@ -32,7 +32,6 @@
#include <Corrade/Utility/DebugStl.h>
#include <Corrade/Utility/Format.h>
#include <Corrade/Utility/Path.h>
#include <Corrade/Utility/String.h>
#include "Magnum/PixelFormat.h"
#include "Magnum/Implementation/converterUtilities.h"
@ -199,6 +198,7 @@ magnum-sceneconverter chair.obj --converter MeshOptimizerSceneConverter -c simpl
}
using namespace Magnum;
using namespace Containers::Literals;
namespace {
@ -314,7 +314,7 @@ is specified as well, the IDs reference attributes of the first mesh.)")
Containers::Pointer<Trade::AbstractImporter> importer = importerManager.loadAndInstantiate(args.value("importer"));
if(!importer) {
Debug{} << "Available importer plugins:" << Utility::String::join(importerManager.aliasList(), ", ");
Debug{} << "Available importer plugins:" << ", "_s.join(importerManager.aliasList());
return 1;
}
@ -1112,7 +1112,7 @@ is specified as well, the IDs reference attributes of the first mesh.)")
"AnySceneConverter" : args.arrayValue("converter", i);
Containers::Pointer<Trade::AbstractSceneConverter> converter = converterManager.loadAndInstantiate(converterName);
if(!converter) {
Debug{} << "Available converter plugins:" << Utility::String::join(converterManager.aliasList(), ", ");
Debug{} << "Available converter plugins:" << ", "_s.join(converterManager.aliasList());
return 2;
}

28
src/Magnum/ShaderTools/AbstractConverter.cpp

@ -25,11 +25,13 @@
#include "AbstractConverter.h"
#include <string> /** @todo remove once file callbacks are <string>-free */
#include <Corrade/Containers/Array.h>
#include <Corrade/Containers/EnumSet.hpp>
#include <Corrade/Containers/Optional.h>
#include <Corrade/Containers/String.h>
#include <Corrade/Containers/StringStl.h> /** @todo remove once file callbacks are <string>-free */
#include <Corrade/PluginManager/Manager.hpp>
#include <Corrade/Utility/Path.h>
#include "Magnum/FileCallback.h"
@ -38,18 +40,34 @@
#include "Magnum/ShaderTools/configure.h"
#endif
namespace Corrade { namespace PluginManager {
/* On non-MinGW Windows the instantiations are already marked with extern
template. However Clang-CL doesn't propagate the export from the extern
template, it seems. */
#if !defined(CORRADE_TARGET_WINDOWS) || defined(CORRADE_TARGET_MINGW) || defined(CORRADE_TARGET_CLANG_CL)
#define MAGNUM_SHADERTOOLS_EXPORT_HPP MAGNUM_SHADERTOOLS_EXPORT
#else
#define MAGNUM_SHADERTOOLS_EXPORT_HPP
#endif
template class MAGNUM_SHADERTOOLS_EXPORT_HPP Manager<Magnum::ShaderTools::AbstractConverter>;
}}
namespace Magnum { namespace ShaderTools {
std::string AbstractConverter::pluginInterface() {
using namespace Containers::Literals;
Containers::StringView AbstractConverter::pluginInterface() {
return
/* [interface] */
"cz.mosra.magnum.ShaderTools.AbstractConverter/0.1"
"cz.mosra.magnum.ShaderTools.AbstractConverter/0.1"_s
/* [interface] */
;
}
#ifndef CORRADE_PLUGINMANAGER_NO_DYNAMIC_PLUGIN_SUPPORT
std::vector<std::string> AbstractConverter::pluginSearchPaths() {
Containers::Array<Containers::String> AbstractConverter::pluginSearchPaths() {
const Containers::Optional<Containers::String> libraryLocation = Utility::Path::libraryLocation(&pluginInterface);
return PluginManager::implicitPluginSearchPaths(
#ifndef MAGNUM_BUILD_STATIC
@ -67,7 +85,7 @@ std::vector<std::string> AbstractConverter::pluginSearchPaths() {
#else
"magnum/"
#endif
"shaderconverters");
"shaderconverters"_s);
}
#endif
@ -75,7 +93,7 @@ AbstractConverter::AbstractConverter() = default;
AbstractConverter::AbstractConverter(PluginManager::Manager<AbstractConverter>& manager): PluginManager::AbstractManagingPlugin<AbstractConverter>{manager} {}
AbstractConverter::AbstractConverter(PluginManager::AbstractManager& manager, const std::string& plugin): PluginManager::AbstractManagingPlugin<AbstractConverter>{manager, plugin} {}
AbstractConverter::AbstractConverter(PluginManager::AbstractManager& manager, const Containers::StringView& plugin): PluginManager::AbstractManagingPlugin<AbstractConverter>{manager, plugin} {}
ConverterFeatures AbstractConverter::features() const {
const ConverterFeatures features = doFeatures();

15
src/Magnum/ShaderTools/AbstractConverter.h

@ -465,7 +465,7 @@ class MAGNUM_SHADERTOOLS_EXPORT AbstractConverter: public PluginManager::Abstrac
*
* @snippet Magnum/ShaderTools/AbstractConverter.cpp interface
*/
static std::string pluginInterface();
static Containers::StringView pluginInterface();
#ifndef CORRADE_PLUGINMANAGER_NO_DYNAMIC_PLUGIN_SUPPORT
/**
@ -481,7 +481,7 @@ class MAGNUM_SHADERTOOLS_EXPORT AbstractConverter: public PluginManager::Abstrac
* Not defined on platforms without
* @ref CORRADE_PLUGINMANAGER_NO_DYNAMIC_PLUGIN_SUPPORT "dynamic plugin support".
*/
static std::vector<std::string> pluginSearchPaths();
static Containers::Array<Containers::String> pluginSearchPaths();
#endif
/** @brief Default constructor */
@ -491,7 +491,10 @@ class MAGNUM_SHADERTOOLS_EXPORT AbstractConverter: public PluginManager::Abstrac
explicit AbstractConverter(PluginManager::Manager<AbstractConverter>& manager);
/** @brief Plugin manager constructor */
explicit AbstractConverter(PluginManager::AbstractManager& manager, const std::string& plugin);
/* The plugin name is passed as a const& to make it possible for people
to implement plugins without even having to include the StringView
header. */
explicit AbstractConverter(PluginManager::AbstractManager& manager, const Containers::StringView& plugin);
/** @brief Features supported by this converter */
ConverterFeatures features() const;
@ -1145,4 +1148,10 @@ template<class Callback, class T> void AbstractConverter::setInputFileCallback(C
}}
#if defined(CORRADE_TARGET_WINDOWS) && !(defined(CORRADE_TARGET_MINGW) && !defined(CORRADE_TARGET_CLANG))
namespace Corrade { namespace PluginManager {
extern template class MAGNUM_SHADERTOOLS_EXPORT Manager<Magnum::ShaderTools::AbstractConverter>;
}}
#endif
#endif

6
src/Magnum/ShaderTools/configure.h.cmake

@ -23,5 +23,7 @@
DEALINGS IN THE SOFTWARE.
*/
#define MAGNUM_PLUGINS_SHADERCONVERTER_DIR "${MAGNUM_PLUGINS_SHADERCONVERTER_DIR}"
#define MAGNUM_PLUGINS_SHADERCONVERTER_DEBUG_DIR "${MAGNUM_PLUGINS_SHADERCONVERTER_DEBUG_DIR}"
/* StringView literals, so they expect the Literals namespace to be used at the
point of use */
#define MAGNUM_PLUGINS_SHADERCONVERTER_DIR "${MAGNUM_PLUGINS_SHADERCONVERTER_DIR}"_s
#define MAGNUM_PLUGINS_SHADERCONVERTER_DEBUG_DIR "${MAGNUM_PLUGINS_SHADERCONVERTER_DEBUG_DIR}"_s

3
src/Magnum/ShaderTools/shaderconverter.cpp

@ -28,7 +28,6 @@
#include <Corrade/Utility/Arguments.h>
#include <Corrade/Utility/DebugStl.h>
#include <Corrade/Utility/Path.h>
#include <Corrade/Utility/String.h>
#include "Magnum/Implementation/converterUtilities.h"
#include "Magnum/Math/Functions.h"
@ -365,7 +364,7 @@ see documentation of a particular converter for more information.)")
args.arrayValue("converter", i) : "AnyShaderConverter";
Containers::Pointer<ShaderTools::AbstractConverter> converter = converterManager.loadAndInstantiate(converterName);
if(!converter) {
Debug{} << "Available converter plugins:" << Utility::String::join(converterManager.aliasList(), ", ");
Debug{} << "Available converter plugins:" << ", "_s.join(converterManager.aliasList());
return 7;
}

31
src/Magnum/Text/AbstractFont.cpp

@ -29,8 +29,9 @@
#include <Corrade/Containers/EnumSet.hpp>
#include <Corrade/Containers/Optional.h>
#include <Corrade/Containers/String.h>
#include <Corrade/Containers/StringStl.h> /** @todo remove once PluginManager is <string>-free */
#include <Corrade/Utility/DebugStl.h>
#include <Corrade/Containers/StringStl.h> /** @todo remove once file callbacks are <string>-free */
#include <Corrade/PluginManager/Manager.hpp>
#include <Corrade/Utility/DebugStl.h> /** @todo remove once AbstractFont is <string>-free */
#include <Corrade/Utility/Path.h>
#include <Corrade/Utility/Unicode.h>
@ -42,18 +43,34 @@
#include "Magnum/Text/configure.h"
#endif
namespace Corrade { namespace PluginManager {
/* On non-MinGW Windows the instantiations are already marked with extern
template. However Clang-CL doesn't propagate the export from the extern
template, it seems. */
#if !defined(CORRADE_TARGET_WINDOWS) || defined(CORRADE_TARGET_MINGW) || defined(CORRADE_TARGET_CLANG_CL)
#define MAGNUM_TEXT_EXPORT_HPP MAGNUM_TEXT_EXPORT
#else
#define MAGNUM_TEXT_EXPORT_HPP
#endif
template class MAGNUM_TEXT_EXPORT_HPP Manager<Magnum::Text::AbstractFont>;
}}
namespace Magnum { namespace Text {
std::string AbstractFont::pluginInterface() {
using namespace Containers::Literals;
Containers::StringView AbstractFont::pluginInterface() {
return
/* [interface] */
"cz.mosra.magnum.Text.AbstractFont/0.3"
"cz.mosra.magnum.Text.AbstractFont/0.3"_s
/* [interface] */
;
}
#ifndef CORRADE_PLUGINMANAGER_NO_DYNAMIC_PLUGIN_SUPPORT
std::vector<std::string> AbstractFont::pluginSearchPaths() {
Containers::Array<Containers::String> AbstractFont::pluginSearchPaths() {
const Containers::Optional<Containers::String> libraryLocation = Utility::Path::libraryLocation(&pluginInterface);
return PluginManager::implicitPluginSearchPaths(
#ifndef MAGNUM_BUILD_STATIC
@ -71,13 +88,13 @@ std::vector<std::string> AbstractFont::pluginSearchPaths() {
#else
"magnum/"
#endif
"fonts");
"fonts"_s);
}
#endif
AbstractFont::AbstractFont() = default;
AbstractFont::AbstractFont(PluginManager::AbstractManager& manager, const std::string& plugin): AbstractPlugin{manager, plugin} {}
AbstractFont::AbstractFont(PluginManager::AbstractManager& manager, const Containers::StringView& plugin): AbstractPlugin{manager, plugin} {}
void AbstractFont::setFileCallback(Containers::Optional<Containers::ArrayView<const char>>(*callback)(const std::string&, InputFileCallbackPolicy, void*), void* const userData) {
CORRADE_ASSERT(!isOpened(), "Text::AbstractFont::setFileCallback(): can't be set while a font is opened", );

15
src/Magnum/Text/AbstractFont.h

@ -187,7 +187,7 @@ class MAGNUM_TEXT_EXPORT AbstractFont: public PluginManager::AbstractPlugin {
*
* @snippet Magnum/Text/AbstractFont.cpp interface
*/
static std::string pluginInterface();
static Containers::StringView pluginInterface();
#ifndef CORRADE_PLUGINMANAGER_NO_DYNAMIC_PLUGIN_SUPPORT
/**
@ -203,14 +203,17 @@ class MAGNUM_TEXT_EXPORT AbstractFont: public PluginManager::AbstractPlugin {
* Not defined on platforms without
* @ref CORRADE_PLUGINMANAGER_NO_DYNAMIC_PLUGIN_SUPPORT "dynamic plugin support".
*/
static std::vector<std::string> pluginSearchPaths();
static Containers::Array<Containers::String> pluginSearchPaths();
#endif
/** @brief Default constructor */
explicit AbstractFont();
/** @brief Plugin manager constructor */
explicit AbstractFont(PluginManager::AbstractManager& manager, const std::string& plugin);
/* The plugin name is passed as a const& to make it possible for people
to implement plugins without even having to include the StringView
header. */
explicit AbstractFont(PluginManager::AbstractManager& manager, const Containers::StringView& plugin);
/** @brief Features supported by this font */
FontFeatures features() const { return doFeatures(); }
@ -646,4 +649,10 @@ template<class Callback, class T> void AbstractFont::setFileCallback(Callback ca
}}
#if defined(CORRADE_TARGET_WINDOWS) && !(defined(CORRADE_TARGET_MINGW) && !defined(CORRADE_TARGET_CLANG))
namespace Corrade { namespace PluginManager {
extern template class MAGNUM_TEXT_EXPORT Manager<Magnum::Text::AbstractFont>;
}}
#endif
#endif

29
src/Magnum/Text/AbstractFontConverter.cpp

@ -30,9 +30,10 @@
#include <Corrade/Containers/EnumSet.hpp>
#include <Corrade/Containers/Optional.h>
#include <Corrade/Containers/String.h>
#include <Corrade/Containers/StringStl.h> /** @todo remove once PluginManager and AbstractFontConverter is <string>-free */
#include <Corrade/Containers/StringStl.h> /** @todo remove once AbstractFontConverter is <string>-free */
#include <Corrade/PluginManager/Manager.hpp>
#include <Corrade/Utility/Assert.h>
#include <Corrade/Utility/DebugStl.h>
#include <Corrade/Utility/DebugStl.h> /** @todo remove once AbstractFontConverter is <string>-free */
#include <Corrade/Utility/Path.h>
#include <Corrade/Utility/Unicode.h>
@ -42,8 +43,24 @@
#include "Magnum/Text/configure.h"
#endif
namespace Corrade { namespace PluginManager {
/* On non-MinGW Windows the instantiations are already marked with extern
template. However Clang-CL doesn't propagate the export from the extern
template, it seems. */
#if !defined(CORRADE_TARGET_WINDOWS) || defined(CORRADE_TARGET_MINGW) || defined(CORRADE_TARGET_CLANG_CL)
#define MAGNUM_TEXT_EXPORT_HPP MAGNUM_TEXT_EXPORT
#else
#define MAGNUM_TEXT_EXPORT_HPP
#endif
template class MAGNUM_TEXT_EXPORT_HPP Manager<Magnum::Text::AbstractFontConverter>;
}}
namespace Magnum { namespace Text {
using namespace Containers::Literals;
namespace {
std::u32string uniqueUnicode(const std::string& characters)
@ -60,16 +77,16 @@ std::u32string uniqueUnicode(const std::string& characters)
}
std::string AbstractFontConverter::pluginInterface() {
Containers::StringView AbstractFontConverter::pluginInterface() {
return
/* [interface] */
"cz.mosra.magnum.Text.AbstractFontConverter/0.2"
"cz.mosra.magnum.Text.AbstractFontConverter/0.2"_s
/* [interface] */
;
}
#ifndef CORRADE_PLUGINMANAGER_NO_DYNAMIC_PLUGIN_SUPPORT
std::vector<std::string> AbstractFontConverter::pluginSearchPaths() {
Containers::Array<Containers::String> AbstractFontConverter::pluginSearchPaths() {
const Containers::Optional<Containers::String> libraryLocation = Utility::Path::libraryLocation(&pluginInterface);
return PluginManager::implicitPluginSearchPaths(
#ifndef MAGNUM_BUILD_STATIC
@ -93,7 +110,7 @@ std::vector<std::string> AbstractFontConverter::pluginSearchPaths() {
AbstractFontConverter::AbstractFontConverter() = default;
AbstractFontConverter::AbstractFontConverter(PluginManager::AbstractManager& manager, const std::string& plugin): PluginManager::AbstractPlugin{manager, plugin} {}
AbstractFontConverter::AbstractFontConverter(PluginManager::AbstractManager& manager, const Containers::StringView& plugin): PluginManager::AbstractPlugin{manager, plugin} {}
std::vector<std::pair<std::string, Containers::Array<char>>> AbstractFontConverter::exportFontToData(AbstractFont& font, AbstractGlyphCache& cache, const std::string& filename, const std::string& characters) const {
CORRADE_ASSERT(features() >= (FontConverterFeature::ExportFont|FontConverterFeature::ConvertData),

15
src/Magnum/Text/AbstractFontConverter.h

@ -178,7 +178,7 @@ class MAGNUM_TEXT_EXPORT AbstractFontConverter: public PluginManager::AbstractPl
*
* @snippet Magnum/Text/AbstractFontConverter.cpp interface
*/
static std::string pluginInterface();
static Containers::StringView pluginInterface();
#ifndef CORRADE_PLUGINMANAGER_NO_DYNAMIC_PLUGIN_SUPPORT
/**
@ -194,14 +194,17 @@ class MAGNUM_TEXT_EXPORT AbstractFontConverter: public PluginManager::AbstractPl
* Not defined on platforms without
* @ref CORRADE_PLUGINMANAGER_NO_DYNAMIC_PLUGIN_SUPPORT "dynamic plugin support".
*/
static std::vector<std::string> pluginSearchPaths();
static Containers::Array<Containers::String> pluginSearchPaths();
#endif
/** @brief Default constructor */
explicit AbstractFontConverter();
/** @brief Plugin manager constructor */
explicit AbstractFontConverter(PluginManager::AbstractManager& manager, const std::string& plugin);
/* The plugin name is passed as a const& to make it possible for people
to implement plugins without even having to include the StringView
header. */
explicit AbstractFontConverter(PluginManager::AbstractManager& manager, const Containers::StringView& plugin);
/** @brief Features supported by this converter */
FontConverterFeatures features() const { return doFeatures(); }
@ -407,4 +410,10 @@ class MAGNUM_TEXT_EXPORT AbstractFontConverter: public PluginManager::AbstractPl
}}
#if defined(CORRADE_TARGET_WINDOWS) && !(defined(CORRADE_TARGET_MINGW) && !defined(CORRADE_TARGET_CLANG))
namespace Corrade { namespace PluginManager {
extern template class MAGNUM_TEXT_EXPORT Manager<Magnum::Text::AbstractFontConverter>;
}}
#endif
#endif

10
src/Magnum/Text/configure.h.cmake

@ -23,7 +23,9 @@
DEALINGS IN THE SOFTWARE.
*/
#define MAGNUM_PLUGINS_FONT_DIR "${MAGNUM_PLUGINS_FONT_DIR}"
#define MAGNUM_PLUGINS_FONT_DEBUG_DIR "${MAGNUM_PLUGINS_FONT_DEBUG_DIR}"
#define MAGNUM_PLUGINS_FONTCONVERTER_DIR "${MAGNUM_PLUGINS_FONTCONVERTER_DIR}"
#define MAGNUM_PLUGINS_FONTCONVERTER_DEBUG_DIR "${MAGNUM_PLUGINS_FONTCONVERTER_DEBUG_DIR}"
/* StringView literals, so they expect the Literals namespace to be used at the
point of use */
#define MAGNUM_PLUGINS_FONT_DIR "${MAGNUM_PLUGINS_FONT_DIR}"_s
#define MAGNUM_PLUGINS_FONT_DEBUG_DIR "${MAGNUM_PLUGINS_FONT_DEBUG_DIR}"_s
#define MAGNUM_PLUGINS_FONTCONVERTER_DIR "${MAGNUM_PLUGINS_FONTCONVERTER_DIR}"_s
#define MAGNUM_PLUGINS_FONTCONVERTER_DEBUG_DIR "${MAGNUM_PLUGINS_FONTCONVERTER_DEBUG_DIR}"_s

27
src/Magnum/Trade/AbstractImageConverter.cpp

@ -30,6 +30,7 @@
#include <Corrade/Containers/Optional.h>
#include <Corrade/Containers/StringView.h>
#include <Corrade/Containers/StringStl.h> /** @todo remove once PluginManager is <string>-free */
#include <Corrade/PluginManager/Manager.hpp>
#include <Corrade/Utility/Assert.h>
#include <Corrade/Utility/Path.h>
#include <Corrade/Utility/DebugStl.h>
@ -43,18 +44,34 @@
#include "Magnum/Trade/configure.h"
#endif
namespace Corrade { namespace PluginManager {
/* On non-MinGW Windows the instantiations are already marked with extern
template. However Clang-CL doesn't propagate the export from the extern
template, it seems. */
#if !defined(CORRADE_TARGET_WINDOWS) || defined(CORRADE_TARGET_MINGW) || defined(CORRADE_TARGET_CLANG_CL)
#define MAGNUM_TRADE_EXPORT_HPP MAGNUM_TRADE_EXPORT
#else
#define MAGNUM_TRADE_EXPORT_HPP
#endif
template class MAGNUM_TRADE_EXPORT_HPP Manager<Magnum::Trade::AbstractImageConverter>;
}}
namespace Magnum { namespace Trade {
std::string AbstractImageConverter::pluginInterface() {
using namespace Containers::Literals;
Containers::StringView AbstractImageConverter::pluginInterface() {
return
/* [interface] */
"cz.mosra.magnum.Trade.AbstractImageConverter/0.3.1"
"cz.mosra.magnum.Trade.AbstractImageConverter/0.3.1"_s
/* [interface] */
;
}
#ifndef CORRADE_PLUGINMANAGER_NO_DYNAMIC_PLUGIN_SUPPORT
std::vector<std::string> AbstractImageConverter::pluginSearchPaths() {
Containers::Array<Containers::String> AbstractImageConverter::pluginSearchPaths() {
const Containers::Optional<Containers::String> libraryLocation = Utility::Path::libraryLocation(&pluginInterface);
return PluginManager::implicitPluginSearchPaths(
#ifndef MAGNUM_BUILD_STATIC
@ -72,7 +89,7 @@ std::vector<std::string> AbstractImageConverter::pluginSearchPaths() {
#else
"magnum/"
#endif
"imageconverters");
"imageconverters"_s);
}
#endif
@ -80,7 +97,7 @@ AbstractImageConverter::AbstractImageConverter() = default;
AbstractImageConverter::AbstractImageConverter(PluginManager::Manager<AbstractImageConverter>& manager): PluginManager::AbstractManagingPlugin<AbstractImageConverter>{manager} {}
AbstractImageConverter::AbstractImageConverter(PluginManager::AbstractManager& manager, const std::string& plugin): PluginManager::AbstractManagingPlugin<AbstractImageConverter>{manager, plugin} {}
AbstractImageConverter::AbstractImageConverter(PluginManager::AbstractManager& manager, const Containers::StringView& plugin): PluginManager::AbstractManagingPlugin<AbstractImageConverter>{manager, plugin} {}
void AbstractImageConverter::setFlags(ImageConverterFlags flags) {
_flags = flags;

15
src/Magnum/Trade/AbstractImageConverter.h

@ -621,7 +621,7 @@ class MAGNUM_TRADE_EXPORT AbstractImageConverter: public PluginManager::Abstract
*
* @snippet Magnum/Trade/AbstractImageConverter.cpp interface
*/
static std::string pluginInterface();
static Containers::StringView pluginInterface();
#ifndef CORRADE_PLUGINMANAGER_NO_DYNAMIC_PLUGIN_SUPPORT
/**
@ -637,7 +637,7 @@ class MAGNUM_TRADE_EXPORT AbstractImageConverter: public PluginManager::Abstract
* Not defined on platforms without
* @ref CORRADE_PLUGINMANAGER_NO_DYNAMIC_PLUGIN_SUPPORT "dynamic plugin support".
*/
static std::vector<std::string> pluginSearchPaths();
static Containers::Array<Containers::String> pluginSearchPaths();
#endif
/** @brief Default constructor */
@ -647,7 +647,10 @@ class MAGNUM_TRADE_EXPORT AbstractImageConverter: public PluginManager::Abstract
explicit AbstractImageConverter(PluginManager::Manager<AbstractImageConverter>& manager);
/** @brief Plugin manager constructor */
explicit AbstractImageConverter(PluginManager::AbstractManager& manager, const std::string& plugin);
/* The plugin name is passed as a const& to make it possible for people
to implement plugins without even having to include the StringView
header. */
explicit AbstractImageConverter(PluginManager::AbstractManager& manager, const Containers::StringView& plugin);
/** @brief Features supported by this converter */
ImageConverterFeatures features() const { return doFeatures(); }
@ -1732,4 +1735,10 @@ class MAGNUM_TRADE_EXPORT AbstractImageConverter: public PluginManager::Abstract
}}
#if defined(CORRADE_TARGET_WINDOWS) && !(defined(CORRADE_TARGET_MINGW) && !defined(CORRADE_TARGET_CLANG))
namespace Corrade { namespace PluginManager {
extern template class MAGNUM_TRADE_EXPORT Manager<Magnum::Trade::AbstractImageConverter>;
}}
#endif
#endif

31
src/Magnum/Trade/AbstractImporter.cpp

@ -29,9 +29,10 @@
#include <Corrade/Containers/EnumSet.hpp>
#include <Corrade/Containers/Optional.h>
#include <Corrade/Containers/String.h>
#include <Corrade/Containers/StringStl.h> /** @todo remove once PluginManager is <string>-free */
#include <Corrade/Containers/StringStl.h> /** @todo remove once file callbacks are <string>-free */
#include <Corrade/PluginManager/Manager.hpp>
#include <Corrade/Utility/Assert.h>
#include <Corrade/Utility/DebugStl.h>
#include <Corrade/Utility/DebugStl.h> /** @todo remove once AbstractImporter is <string>-free */
#include <Corrade/Utility/Path.h>
#include "Magnum/FileCallback.h"
@ -67,18 +68,34 @@
#include "Magnum/Trade/configure.h"
#endif
namespace Corrade { namespace PluginManager {
/* On non-MinGW Windows the instantiations are already marked with extern
template. However Clang-CL doesn't propagate the export from the extern
template, it seems. */
#if !defined(CORRADE_TARGET_WINDOWS) || defined(CORRADE_TARGET_MINGW) || defined(CORRADE_TARGET_CLANG_CL)
#define MAGNUM_TRADE_EXPORT_HPP MAGNUM_TRADE_EXPORT
#else
#define MAGNUM_TRADE_EXPORT_HPP
#endif
template class MAGNUM_TRADE_EXPORT_HPP Manager<Magnum::Trade::AbstractImporter>;
}}
namespace Magnum { namespace Trade {
std::string AbstractImporter::pluginInterface() {
using namespace Containers::Literals;
Containers::StringView AbstractImporter::pluginInterface() {
return
/* [interface] */
"cz.mosra.magnum.Trade.AbstractImporter/0.4"
"cz.mosra.magnum.Trade.AbstractImporter/0.4"_s
/* [interface] */
;
}
#ifndef CORRADE_PLUGINMANAGER_NO_DYNAMIC_PLUGIN_SUPPORT
std::vector<std::string> AbstractImporter::pluginSearchPaths() {
Containers::Array<Containers::String> AbstractImporter::pluginSearchPaths() {
const Containers::Optional<Containers::String> libraryLocation = Utility::Path::libraryLocation(&pluginInterface);
return PluginManager::implicitPluginSearchPaths(
#ifndef MAGNUM_BUILD_STATIC
@ -96,7 +113,7 @@ std::vector<std::string> AbstractImporter::pluginSearchPaths() {
#else
"magnum/"
#endif
"importers");
"importers"_s);
}
#endif
@ -104,7 +121,7 @@ AbstractImporter::AbstractImporter() = default;
AbstractImporter::AbstractImporter(PluginManager::Manager<AbstractImporter>& manager): PluginManager::AbstractManagingPlugin<AbstractImporter>{manager} {}
AbstractImporter::AbstractImporter(PluginManager::AbstractManager& manager, const std::string& plugin): PluginManager::AbstractManagingPlugin<AbstractImporter>{manager, plugin} {}
AbstractImporter::AbstractImporter(PluginManager::AbstractManager& manager, const Containers::StringView& plugin): PluginManager::AbstractManagingPlugin<AbstractImporter>{manager, plugin} {}
#ifdef MAGNUM_BUILD_DEPRECATED
/* These twp needed because of the Array<CachedScenes> member */

16
src/Magnum/Trade/AbstractImporter.h

@ -29,6 +29,7 @@
* @brief Class @ref Magnum::Trade::AbstractImporter, enum @ref Magnum::Trade::ImporterFeature, enum set @ref Magnum::Trade::ImporterFeatures
*/
#include <string> /** @todo remove once openState() doesn't have a default std::string argument */
#include <Corrade/Containers/EnumSet.h>
#include <Corrade/PluginManager/AbstractManagingPlugin.h>
@ -447,7 +448,7 @@ class MAGNUM_TRADE_EXPORT AbstractImporter: public PluginManager::AbstractManagi
*
* @snippet Magnum/Trade/AbstractImporter.cpp interface
*/
static std::string pluginInterface();
static Containers::StringView pluginInterface();
#ifndef CORRADE_PLUGINMANAGER_NO_DYNAMIC_PLUGIN_SUPPORT
/**
@ -463,7 +464,7 @@ class MAGNUM_TRADE_EXPORT AbstractImporter: public PluginManager::AbstractManagi
* Not defined on platforms without
* @ref CORRADE_PLUGINMANAGER_NO_DYNAMIC_PLUGIN_SUPPORT "dynamic plugin support".
*/
static std::vector<std::string> pluginSearchPaths();
static Containers::Array<Containers::String> pluginSearchPaths();
#endif
/** @brief Default constructor */
@ -473,7 +474,10 @@ class MAGNUM_TRADE_EXPORT AbstractImporter: public PluginManager::AbstractManagi
explicit AbstractImporter(PluginManager::Manager<AbstractImporter>& manager);
/** @brief Plugin manager constructor */
explicit AbstractImporter(PluginManager::AbstractManager& manager, const std::string& plugin);
/* The plugin name is passed as a const& to make it possible for people
to implement plugins without even having to include the StringView
header. */
explicit AbstractImporter(PluginManager::AbstractManager& manager, const Containers::StringView& plugin);
#if defined(MAGNUM_BUILD_DEPRECATED) && !defined(DOXYGEN_GENERATING_OUTPUT)
/* These twp needed because of the Array<CachedScenes> member
@ -2536,4 +2540,10 @@ template<class Callback, class T> void AbstractImporter::setFileCallback(Callbac
}}
#if defined(CORRADE_TARGET_WINDOWS) && !(defined(CORRADE_TARGET_MINGW) && !defined(CORRADE_TARGET_CLANG))
namespace Corrade { namespace PluginManager {
extern template class MAGNUM_TRADE_EXPORT Manager<Magnum::Trade::AbstractImporter>;
}}
#endif
#endif

33
src/Magnum/Trade/AbstractSceneConverter.cpp

@ -29,28 +29,49 @@
#include <Corrade/Containers/EnumSet.hpp>
#include <Corrade/Containers/Optional.h>
#include <Corrade/Containers/String.h>
#include <Corrade/Containers/StringStl.h> /** @todo remove once PluginManager is <string>-free */
#include <Corrade/PluginManager/Manager.hpp>
#include <Corrade/Utility/Path.h>
#include "Magnum/Trade/ArrayAllocator.h"
#include "Magnum/Trade/MeshData.h"
#ifdef MAGNUM_BUILD_DEPRECATED
/* needed by deprecated convertToFile() that takes a std::string */
#include <Corrade/Containers/StringStl.h>
#endif
#ifndef CORRADE_PLUGINMANAGER_NO_DYNAMIC_PLUGIN_SUPPORT
#include "Magnum/Trade/configure.h"
#endif
namespace Corrade { namespace PluginManager {
/* On non-MinGW Windows the instantiations are already marked with extern
template. However Clang-CL doesn't propagate the export from the extern
template, it seems. */
#if !defined(CORRADE_TARGET_WINDOWS) || defined(CORRADE_TARGET_MINGW) || defined(CORRADE_TARGET_CLANG_CL)
#define MAGNUM_TRADE_EXPORT_HPP MAGNUM_TRADE_EXPORT
#else
#define MAGNUM_TRADE_EXPORT_HPP
#endif
template class MAGNUM_TRADE_EXPORT_HPP Manager<Magnum::Trade::AbstractSceneConverter>;
}}
namespace Magnum { namespace Trade {
std::string AbstractSceneConverter::pluginInterface() {
using namespace Containers::Literals;
Containers::StringView AbstractSceneConverter::pluginInterface() {
return
/* [interface] */
"cz.mosra.magnum.Trade.AbstractSceneConverter/0.1.1"
"cz.mosra.magnum.Trade.AbstractSceneConverter/0.1.1"_s
/* [interface] */
;
}
#ifndef CORRADE_PLUGINMANAGER_NO_DYNAMIC_PLUGIN_SUPPORT
std::vector<std::string> AbstractSceneConverter::pluginSearchPaths() {
Containers::Array<Containers::String> AbstractSceneConverter::pluginSearchPaths() {
const Containers::Optional<Containers::String> libraryLocation = Utility::Path::libraryLocation(&pluginInterface);
return PluginManager::implicitPluginSearchPaths(
#ifndef MAGNUM_BUILD_STATIC
@ -68,7 +89,7 @@ std::vector<std::string> AbstractSceneConverter::pluginSearchPaths() {
#else
"magnum/"
#endif
"sceneconverters");
"sceneconverters"_s);
}
#endif
@ -76,7 +97,7 @@ AbstractSceneConverter::AbstractSceneConverter() = default;
AbstractSceneConverter::AbstractSceneConverter(PluginManager::Manager<AbstractSceneConverter>& manager): PluginManager::AbstractManagingPlugin<AbstractSceneConverter>{manager} {}
AbstractSceneConverter::AbstractSceneConverter(PluginManager::AbstractManager& manager, const std::string& plugin): PluginManager::AbstractManagingPlugin<AbstractSceneConverter>{manager, plugin} {}
AbstractSceneConverter::AbstractSceneConverter(PluginManager::AbstractManager& manager, const Containers::StringView& plugin): PluginManager::AbstractManagingPlugin<AbstractSceneConverter>{manager, plugin} {}
SceneConverterFeatures AbstractSceneConverter::features() const {
const SceneConverterFeatures features = doFeatures();

15
src/Magnum/Trade/AbstractSceneConverter.h

@ -272,7 +272,7 @@ class MAGNUM_TRADE_EXPORT AbstractSceneConverter: public PluginManager::Abstract
*
* @snippet Magnum/Trade/AbstractSceneConverter.cpp interface
*/
static std::string pluginInterface();
static Containers::StringView pluginInterface();
#ifndef CORRADE_PLUGINMANAGER_NO_DYNAMIC_PLUGIN_SUPPORT
/**
@ -288,7 +288,7 @@ class MAGNUM_TRADE_EXPORT AbstractSceneConverter: public PluginManager::Abstract
* Not defined on platforms without
* @ref CORRADE_PLUGINMANAGER_NO_DYNAMIC_PLUGIN_SUPPORT "dynamic plugin support".
*/
static std::vector<std::string> pluginSearchPaths();
static Containers::Array<Containers::String> pluginSearchPaths();
#endif
/** @brief Default constructor */
@ -298,7 +298,10 @@ class MAGNUM_TRADE_EXPORT AbstractSceneConverter: public PluginManager::Abstract
explicit AbstractSceneConverter(PluginManager::Manager<AbstractSceneConverter>& manager);
/** @brief Plugin manager constructor */
explicit AbstractSceneConverter(PluginManager::AbstractManager& manager, const std::string& plugin);
/* The plugin name is passed as a const& to make it possible for people
to implement plugins without even having to include the StringView
header. */
explicit AbstractSceneConverter(PluginManager::AbstractManager& manager, const Containers::StringView& plugin);
/** @brief Features supported by this converter */
SceneConverterFeatures features() const;
@ -447,4 +450,10 @@ class MAGNUM_TRADE_EXPORT AbstractSceneConverter: public PluginManager::Abstract
}}
#if defined(CORRADE_TARGET_WINDOWS) && !(defined(CORRADE_TARGET_MINGW) && !defined(CORRADE_TARGET_CLANG))
namespace Corrade { namespace PluginManager {
extern template class MAGNUM_TRADE_EXPORT Manager<Magnum::Trade::AbstractSceneConverter>;
}}
#endif
#endif

14
src/Magnum/Trade/configure.h.cmake

@ -23,9 +23,11 @@
DEALINGS IN THE SOFTWARE.
*/
#define MAGNUM_PLUGINS_IMPORTER_DIR "${MAGNUM_PLUGINS_IMPORTER_DIR}"
#define MAGNUM_PLUGINS_IMPORTER_DEBUG_DIR "${MAGNUM_PLUGINS_IMPORTER_DEBUG_DIR}"
#define MAGNUM_PLUGINS_IMAGECONVERTER_DIR "${MAGNUM_PLUGINS_IMAGECONVERTER_DIR}"
#define MAGNUM_PLUGINS_IMAGECONVERTER_DEBUG_DIR "${MAGNUM_PLUGINS_IMAGECONVERTER_DEBUG_DIR}"
#define MAGNUM_PLUGINS_SCENECONVERTER_DIR "${MAGNUM_PLUGINS_SCENECONVERTER_DIR}"
#define MAGNUM_PLUGINS_SCENECONVERTER_DEBUG_DIR "${MAGNUM_PLUGINS_SCENECONVERTER_DEBUG_DIR}"
/* StringView literals, so they expect the Literals namespace to be used at the
point of use */
#define MAGNUM_PLUGINS_IMPORTER_DIR "${MAGNUM_PLUGINS_IMPORTER_DIR}"_s
#define MAGNUM_PLUGINS_IMPORTER_DEBUG_DIR "${MAGNUM_PLUGINS_IMPORTER_DEBUG_DIR}"_s
#define MAGNUM_PLUGINS_IMAGECONVERTER_DIR "${MAGNUM_PLUGINS_IMAGECONVERTER_DIR}"_s
#define MAGNUM_PLUGINS_IMAGECONVERTER_DEBUG_DIR "${MAGNUM_PLUGINS_IMAGECONVERTER_DEBUG_DIR}"_s
#define MAGNUM_PLUGINS_SCENECONVERTER_DIR "${MAGNUM_PLUGINS_SCENECONVERTER_DIR}"_s
#define MAGNUM_PLUGINS_SCENECONVERTER_DEBUG_DIR "${MAGNUM_PLUGINS_SCENECONVERTER_DEBUG_DIR}"_s

5
src/Magnum/Trade/imageconverter.cpp

@ -33,7 +33,6 @@
#include <Corrade/Utility/ConfigurationGroup.h>
#include <Corrade/Utility/DebugStl.h>
#include <Corrade/Utility/Path.h>
#include <Corrade/Utility/String.h>
#include "Magnum/ImageView.h"
#include "Magnum/PixelFormat.h"
@ -456,7 +455,7 @@ key=true; configuration subgroups are delimited with /.)")
} else {
Containers::Pointer<Trade::AbstractImporter> importer = importerManager.loadAndInstantiate(args.value("importer"));
if(!importer) {
Debug{} << "Available importer plugins:" << Utility::String::join(importerManager.aliasList(), ", ");
Debug{} << "Available importer plugins:" << ", "_s.join(importerManager.aliasList());
return 1;
}
@ -905,7 +904,7 @@ key=true; configuration subgroups are delimited with /.)")
Utility::Path::join(args.value("plugin-dir"), Trade::AbstractImageConverter::pluginSearchPaths()[0])};
Containers::Pointer<Trade::AbstractImageConverter> converter = converterManager.loadAndInstantiate(args.value("converter"));
if(!converter) {
Debug{} << "Available converter plugins:" << Utility::String::join(converterManager.aliasList(), ", ");
Debug{} << "Available converter plugins:" << ", "_s.join(converterManager.aliasList());
return 2;
}

2
src/MagnumPlugins/ObjImporter/ObjImporter.cpp

@ -84,7 +84,7 @@ template<std::size_t size> Math::Vector<size, Float> extractFloatData(const std:
ObjImporter::ObjImporter() = default;
ObjImporter::ObjImporter(PluginManager::AbstractManager& manager, const std::string& plugin): AbstractImporter{manager, plugin} {}
ObjImporter::ObjImporter(PluginManager::AbstractManager& manager, const Containers::StringView& plugin): AbstractImporter{manager, plugin} {}
ObjImporter::~ObjImporter() = default;

2
src/MagnumPlugins/ObjImporter/ObjImporter.h

@ -105,7 +105,7 @@ class MAGNUM_OBJIMPORTER_EXPORT ObjImporter: public AbstractImporter {
explicit ObjImporter();
/** @brief Plugin manager constructor */
explicit ObjImporter(PluginManager::AbstractManager& manager, const std::string& plugin);
explicit ObjImporter(PluginManager::AbstractManager& manager, const Containers::StringView& plugin);
~ObjImporter();

1
src/MagnumPlugins/TgaImageConverter/Test/TgaImageConverterTest.cpp

@ -27,6 +27,7 @@
#include <tuple>
#include <Corrade/Containers/Array.h>
#include <Corrade/Containers/Optional.h>
#include <Corrade/Containers/StringView.h>
#include <Corrade/TestSuite/Tester.h>
#include <Corrade/TestSuite/Compare/Container.h>
#include <Corrade/Utility/DebugStl.h>

2
src/MagnumPlugins/TgaImageConverter/TgaImageConverter.cpp

@ -41,7 +41,7 @@ namespace Magnum { namespace Trade {
TgaImageConverter::TgaImageConverter() = default;
TgaImageConverter::TgaImageConverter(PluginManager::AbstractManager& manager, const std::string& plugin): AbstractImageConverter{manager, plugin} {}
TgaImageConverter::TgaImageConverter(PluginManager::AbstractManager& manager, const Containers::StringView& plugin): AbstractImageConverter{manager, plugin} {}
ImageConverterFeatures TgaImageConverter::doFeatures() const { return ImageConverterFeature::Convert2DToData; }

2
src/MagnumPlugins/TgaImageConverter/TgaImageConverter.h

@ -100,7 +100,7 @@ class MAGNUM_TGAIMAGECONVERTER_EXPORT TgaImageConverter: public AbstractImageCon
explicit TgaImageConverter();
/** @brief Plugin manager constructor */
explicit TgaImageConverter(PluginManager::AbstractManager& manager, const std::string& plugin);
explicit TgaImageConverter(PluginManager::AbstractManager& manager, const Containers::StringView& plugin);
private:
ImageConverterFeatures MAGNUM_TGAIMAGECONVERTER_LOCAL doFeatures() const override;

2
src/MagnumPlugins/TgaImporter/TgaImporter.cpp

@ -40,7 +40,7 @@ namespace Magnum { namespace Trade {
TgaImporter::TgaImporter() = default;
TgaImporter::TgaImporter(PluginManager::AbstractManager& manager, const std::string& plugin): AbstractImporter{manager, plugin} {}
TgaImporter::TgaImporter(PluginManager::AbstractManager& manager, const Containers::StringView& plugin): AbstractImporter{manager, plugin} {}
TgaImporter::~TgaImporter() = default;

2
src/MagnumPlugins/TgaImporter/TgaImporter.h

@ -105,7 +105,7 @@ class MAGNUM_TGAIMPORTER_EXPORT TgaImporter: public AbstractImporter {
explicit TgaImporter();
/** @brief Plugin manager constructor */
explicit TgaImporter(PluginManager::AbstractManager& manager, const std::string& plugin);
explicit TgaImporter(PluginManager::AbstractManager& manager, const Containers::StringView& plugin);
~TgaImporter();

2
src/MagnumPlugins/WavAudioImporter/WavImporter.cpp

@ -42,7 +42,7 @@ using Implementation::WavHeaderChunk;
WavImporter::WavImporter() = default;
WavImporter::WavImporter(PluginManager::AbstractManager& manager, const std::string& plugin): AbstractImporter{manager, plugin} {}
WavImporter::WavImporter(PluginManager::AbstractManager& manager, const Containers::StringView& plugin): AbstractImporter{manager, plugin} {}
ImporterFeatures WavImporter::doFeatures() const { return ImporterFeature::OpenData; }

2
src/MagnumPlugins/WavAudioImporter/WavImporter.h

@ -115,7 +115,7 @@ class MAGNUM_WAVAUDIOIMPORTER_EXPORT WavImporter: public AbstractImporter {
explicit WavImporter();
/** @brief Plugin manager constructor */
explicit WavImporter(PluginManager::AbstractManager& manager, const std::string& plugin);
explicit WavImporter(PluginManager::AbstractManager& manager, const Containers::StringView& plugin);
private:
MAGNUM_WAVAUDIOIMPORTER_LOCAL ImporterFeatures doFeatures() const override;

Loading…
Cancel
Save