@ -31,6 +31,8 @@
# include <Containers/EnumSet.h>
# include <Containers/EnumSet.h>
# include <PluginManager/AbstractPlugin.h>
# include <PluginManager/AbstractPlugin.h>
# include "Optional/optional.hpp"
# include "Magnum.h"
# include "Magnum.h"
# include "magnumVisibility.h"
# include "magnumVisibility.h"
# include "Trade/Trade.h"
# include "Trade/Trade.h"
@ -157,10 +159,9 @@ class MAGNUM_EXPORT AbstractImporter: public PluginManager::AbstractPlugin {
* @ brief % Scene
* @ brief % Scene
* @ param id % Scene ID , from range [ 0 , sceneCount ( ) ) .
* @ param id % Scene ID , from range [ 0 , sceneCount ( ) ) .
*
*
* Returns given scene or ` nullptr ` if import failed . Deleting the data
* Returns given scene or ` std : : nullopt ` if import failed .
* is user responsibility .
*/
*/
SceneData * scene ( UnsignedInt id ) ;
std : : optional < SceneData > scene ( UnsignedInt id ) ;
/** @brief %Light count */
/** @brief %Light count */
UnsignedInt lightCount ( ) const ;
UnsignedInt lightCount ( ) const ;
@ -185,10 +186,9 @@ class MAGNUM_EXPORT AbstractImporter: public PluginManager::AbstractPlugin {
* @ brief % Light
* @ brief % Light
* @ param id % Light ID , from range [ 0 , lightCount ( ) ) .
* @ param id % Light ID , from range [ 0 , lightCount ( ) ) .
*
*
* Returns given light or ` nullptr ` if importing failed . Deleting the
* Returns given light or ` std : : nullopt ` if importing failed .
* data is user responsibility .
*/
*/
LightData * light ( UnsignedInt id ) ;
std : : optional < LightData > light ( UnsignedInt id ) ;
/** @brief Camera count */
/** @brief Camera count */
UnsignedInt cameraCount ( ) const ;
UnsignedInt cameraCount ( ) const ;
@ -213,10 +213,9 @@ class MAGNUM_EXPORT AbstractImporter: public PluginManager::AbstractPlugin {
* @ brief Camera
* @ brief Camera
* @ param id Camera ID , from range [ 0 , cameraCount ( ) ) .
* @ param id Camera ID , from range [ 0 , cameraCount ( ) ) .
*
*
* Returns given camera or ` nullptr ` if importing failed . Deleting the
* Returns given camera or ` std : : nullopt ` if importing failed .
* data is user responsibility .
*/
*/
CameraData * camera ( UnsignedInt id ) ;
std : : optional < CameraData > camera ( UnsignedInt id ) ;
/** @brief Two-dimensional object count */
/** @brief Two-dimensional object count */
UnsignedInt object2DCount ( ) const ;
UnsignedInt object2DCount ( ) const ;
@ -297,10 +296,9 @@ class MAGNUM_EXPORT AbstractImporter: public PluginManager::AbstractPlugin {
* @ brief Two - dimensional mesh
* @ brief Two - dimensional mesh
* @ param id % Mesh ID , from range [ 0 , mesh2DCount ( ) ) .
* @ param id % Mesh ID , from range [ 0 , mesh2DCount ( ) ) .
*
*
* Returns given mesh or ` nullptr ` if importing failed . Deleting the
* Returns given mesh or ` std : : nullopt ` if importing failed .
* data is user responsibility .
*/
*/
MeshData2D * mesh2D ( UnsignedInt id ) ;
std : : optional < MeshData2D > mesh2D ( UnsignedInt id ) ;
/** @brief Three-dimensional mesh count */
/** @brief Three-dimensional mesh count */
UnsignedInt mesh3DCount ( ) const ;
UnsignedInt mesh3DCount ( ) const ;
@ -325,10 +323,9 @@ class MAGNUM_EXPORT AbstractImporter: public PluginManager::AbstractPlugin {
* @ brief Three - dimensional mesh
* @ brief Three - dimensional mesh
* @ param id % Mesh ID , from range [ 0 , mesh3DCount ( ) ) .
* @ param id % Mesh ID , from range [ 0 , mesh3DCount ( ) ) .
*
*
* Returns given mesh or ` nullptr ` if importing failed . Deleting the
* Returns given mesh or ` std : : nullopt ` if importing failed .
* data is user responsibility .
*/
*/
MeshData3D * mesh3D ( UnsignedInt id ) ;
std : : optional < MeshData3D > mesh3D ( UnsignedInt id ) ;
/** @brief Material count */
/** @brief Material count */
UnsignedInt materialCount ( ) const ;
UnsignedInt materialCount ( ) const ;
@ -381,10 +378,9 @@ class MAGNUM_EXPORT AbstractImporter: public PluginManager::AbstractPlugin {
* @ brief % Texture
* @ brief % Texture
* @ param id % Texture ID , from range [ 0 , textureCount ( ) ) .
* @ param id % Texture ID , from range [ 0 , textureCount ( ) ) .
*
*
* Returns given texture or ` nullptr ` if importing failed . Deleting the
* Returns given texture or ` std : : nullopt ` if importing failed .
* data is user responsibility .
*/
*/
TextureData * texture ( UnsignedInt id ) ;
std : : optional < TextureData > texture ( UnsignedInt id ) ;
/** @brief One-dimensional image count */
/** @brief One-dimensional image count */
UnsignedInt image1DCount ( ) const ;
UnsignedInt image1DCount ( ) const ;
@ -409,10 +405,9 @@ class MAGNUM_EXPORT AbstractImporter: public PluginManager::AbstractPlugin {
* @ brief One - dimensional image
* @ brief One - dimensional image
* @ param id % Image ID , from range [ 0 , image1DCount ( ) ) .
* @ param id % Image ID , from range [ 0 , image1DCount ( ) ) .
*
*
* Returns given image or ` nullptr ` if importing failed . Deleting the
* Returns given image or ` std : : nullopt ` if importing failed .
* data is user responsibility .
*/
*/
ImageData1D * image1D ( UnsignedInt id ) ;
std : : optional < ImageData1D > image1D ( UnsignedInt id ) ;
/** @brief Two-dimensional image count */
/** @brief Two-dimensional image count */
UnsignedInt image2DCount ( ) const ;
UnsignedInt image2DCount ( ) const ;
@ -437,10 +432,9 @@ class MAGNUM_EXPORT AbstractImporter: public PluginManager::AbstractPlugin {
* @ brief Two - dimensional image
* @ brief Two - dimensional image
* @ param id % Image ID , from range [ 0 , image2DCount ( ) ) .
* @ param id % Image ID , from range [ 0 , image2DCount ( ) ) .
*
*
* Returns given image or ` nullptr ` if importing failed . Deleting the
* Returns given image or ` std : : nullopt ` if importing failed .
* data is user responsibility .
*/
*/
ImageData2D * image2D ( UnsignedInt id ) ;
std : : optional < ImageData2D > image2D ( UnsignedInt id ) ;
/** @brief Three-dimensional image count */
/** @brief Three-dimensional image count */
UnsignedInt image3DCount ( ) const ;
UnsignedInt image3DCount ( ) const ;
@ -465,10 +459,9 @@ class MAGNUM_EXPORT AbstractImporter: public PluginManager::AbstractPlugin {
* @ brief Three - dimensional image
* @ brief Three - dimensional image
* @ param id % Image ID , from range [ 0 , image3DCount ( ) ) .
* @ param id % Image ID , from range [ 0 , image3DCount ( ) ) .
*
*
* Returns given image or ` nullptr ` if importing failed . Deleting the
* Returns given image or ` std : : nullopt ` if importing failed .
* data is user responsibility .
*/
*/
ImageData3D * image3D ( UnsignedInt id ) ;
std : : optional < ImageData3D > image3D ( UnsignedInt id ) ;
/*@}*/
/*@}*/
@ -510,7 +503,7 @@ class MAGNUM_EXPORT AbstractImporter: public PluginManager::AbstractPlugin {
virtual std : : string doSceneName ( UnsignedInt id ) ;
virtual std : : string doSceneName ( UnsignedInt id ) ;
/** @brief Implementation for scene() */
/** @brief Implementation for scene() */
virtual SceneData * doScene ( UnsignedInt id ) ;
virtual std : : optional < SceneData > doScene ( UnsignedInt id ) ;
/** @brief Implementation for lightCount() */
/** @brief Implementation for lightCount() */
virtual UnsignedInt doLightCount ( ) const ;
virtual UnsignedInt doLightCount ( ) const ;
@ -522,7 +515,7 @@ class MAGNUM_EXPORT AbstractImporter: public PluginManager::AbstractPlugin {
virtual std : : string doLightName ( UnsignedInt id ) ;
virtual std : : string doLightName ( UnsignedInt id ) ;
/** @brief Implementation for light() */
/** @brief Implementation for light() */
virtual LightData * doLight ( UnsignedInt id ) ;
virtual std : : optional < LightData > doLight ( UnsignedInt id ) ;
/** @brief Implementation for cameraCount() */
/** @brief Implementation for cameraCount() */
virtual UnsignedInt doCameraCount ( ) const ;
virtual UnsignedInt doCameraCount ( ) const ;
@ -534,7 +527,7 @@ class MAGNUM_EXPORT AbstractImporter: public PluginManager::AbstractPlugin {
virtual std : : string doCameraName ( UnsignedInt id ) ;
virtual std : : string doCameraName ( UnsignedInt id ) ;
/** @brief Implementation for camera() */
/** @brief Implementation for camera() */
virtual CameraData * doCamera ( UnsignedInt id ) ;
virtual std : : optional < CameraData > doCamera ( UnsignedInt id ) ;
/** @brief Implementation for object2DCount() */
/** @brief Implementation for object2DCount() */
virtual UnsignedInt doObject2DCount ( ) const ;
virtual UnsignedInt doObject2DCount ( ) const ;
@ -570,7 +563,7 @@ class MAGNUM_EXPORT AbstractImporter: public PluginManager::AbstractPlugin {
virtual std : : string doMesh2DName ( UnsignedInt id ) ;
virtual std : : string doMesh2DName ( UnsignedInt id ) ;
/** @brief Implementation for mesh2D() */
/** @brief Implementation for mesh2D() */
virtual MeshData2D * doMesh2D ( UnsignedInt id ) ;
virtual std : : optional < MeshData2D > doMesh2D ( UnsignedInt id ) ;
/** @brief Implementation for mesh3DCount() */
/** @brief Implementation for mesh3DCount() */
virtual UnsignedInt doMesh3DCount ( ) const ;
virtual UnsignedInt doMesh3DCount ( ) const ;
@ -582,7 +575,7 @@ class MAGNUM_EXPORT AbstractImporter: public PluginManager::AbstractPlugin {
virtual std : : string doMesh3DName ( UnsignedInt id ) ;
virtual std : : string doMesh3DName ( UnsignedInt id ) ;
/** @brief Implementation for mesh3D() */
/** @brief Implementation for mesh3D() */
virtual MeshData3D * doMesh3D ( UnsignedInt id ) ;
virtual std : : optional < MeshData3D > doMesh3D ( UnsignedInt id ) ;
/** @brief Implementation for materialCount() */
/** @brief Implementation for materialCount() */
virtual UnsignedInt doMaterialCount ( ) const ;
virtual UnsignedInt doMaterialCount ( ) const ;
@ -606,7 +599,7 @@ class MAGNUM_EXPORT AbstractImporter: public PluginManager::AbstractPlugin {
virtual std : : string doTextureName ( UnsignedInt id ) ;
virtual std : : string doTextureName ( UnsignedInt id ) ;
/** @brief Implementation for texture() */
/** @brief Implementation for texture() */
virtual TextureData * doTexture ( UnsignedInt id ) ;
virtual std : : optional < TextureData > doTexture ( UnsignedInt id ) ;
/** @brief Implementation for image1DCount() */
/** @brief Implementation for image1DCount() */
virtual UnsignedInt doImage1DCount ( ) const ;
virtual UnsignedInt doImage1DCount ( ) const ;
@ -618,7 +611,7 @@ class MAGNUM_EXPORT AbstractImporter: public PluginManager::AbstractPlugin {
virtual std : : string doImage1DName ( UnsignedInt id ) ;
virtual std : : string doImage1DName ( UnsignedInt id ) ;
/** @brief Implementation for image1D() */
/** @brief Implementation for image1D() */
virtual ImageData1D * doImage1D ( UnsignedInt id ) ;
virtual std : : optional < ImageData1D > doImage1D ( UnsignedInt id ) ;
/** @brief Implementation for image2DCount() */
/** @brief Implementation for image2DCount() */
virtual UnsignedInt doImage2DCount ( ) const ;
virtual UnsignedInt doImage2DCount ( ) const ;
@ -630,7 +623,7 @@ class MAGNUM_EXPORT AbstractImporter: public PluginManager::AbstractPlugin {
virtual std : : string doImage2DName ( UnsignedInt id ) ;
virtual std : : string doImage2DName ( UnsignedInt id ) ;
/** @brief Implementation for image2D() */
/** @brief Implementation for image2D() */
virtual ImageData2D * doImage2D ( UnsignedInt id ) ;
virtual std : : optional < ImageData2D > doImage2D ( UnsignedInt id ) ;
/** @brief Implementation for image3DCount() */
/** @brief Implementation for image3DCount() */
virtual UnsignedInt doImage3DCount ( ) const ;
virtual UnsignedInt doImage3DCount ( ) const ;
@ -642,7 +635,7 @@ class MAGNUM_EXPORT AbstractImporter: public PluginManager::AbstractPlugin {
virtual std : : string doImage3DName ( UnsignedInt id ) ;
virtual std : : string doImage3DName ( UnsignedInt id ) ;
/** @brief Implementation for image3D() */
/** @brief Implementation for image3D() */
virtual ImageData3D * doImage3D ( UnsignedInt id ) ;
virtual std : : optional < ImageData3D > doImage3D ( UnsignedInt id ) ;
} ;
} ;
CORRADE_ENUMSET_OPERATORS ( AbstractImporter : : Features )
CORRADE_ENUMSET_OPERATORS ( AbstractImporter : : Features )