CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CeresEngine::TResourceImporter< T, O > Class Template Referenceabstract

Creates a new resource importer. More...

#include <CeresEngine/Resource/Importer/ResourceImporter.hpp>

Inheritance diagram for CeresEngine::TResourceImporter< T, O >:
CeresEngine::ResourceImporter

Public Member Functions

Async< ImportedResourcesimport (const ResourceURL &url, const ResourceImportOptions &options) final
 Imports a resource from a URL.
 
virtual Async< ImportedResourcesimport (const ResourceURL &url, const O &options)=0
 Imports a resource from a URL.
 
 ResourceImporter (ResourceManager &resourceManager)
 Creates a new resource importer.
 
- Public Member Functions inherited from CeresEngine::ResourceImporter
 ResourceImporter (ResourceManager &resourceManager)
 Creates a new resource importer.
 
virtual ~ResourceImporter ()=default
 Destroys the resource importer.
 
virtual Async< SupportStatussupports (const ResourceURL &url)=0
 Checks if the import supports the given resource.
 

Additional Inherited Members

- Public Types inherited from CeresEngine::ResourceImporter
enum class  SupportStatus { Supported , Generic , Unsupported }
 An enumeration that contains the possible importer support status. More...
 
- Protected Attributes inherited from CeresEngine::ResourceImporter
ResourceManagermResourceManager
 The owning resource manager.
 
URLSessionmURLSession
 The URL session to be used to load resources.
 
ExecutionContextmExecutionContext
 The execution context to perform asynchronous resource operations on.
 

Detailed Description

template<typename T, typename O = ResourceImportOptions>
class CeresEngine::TResourceImporter< T, O >

Creates a new resource importer.

Parameters
resourceManagerThe owning resource manager.

Member Function Documentation

◆ import() [1/2]

template<typename T , typename O = ResourceImportOptions>
virtual Async< ImportedResources > CeresEngine::TResourceImporter< T, O >::import ( const ResourceURL url,
const O options 
)
pure virtual

Imports a resource from a URL.

Parameters
urlThe URL to import the resource from.
Returns
A continuable that returns once the resource has been imported.

Implemented in CeresEngine::OggVorbisClipImporter, CeresEngine::DefaultFontImporter, CeresEngine::MTLMaterialImporter, CeresEngine::OBJMeshImporter, CeresEngine::GLTFSceneImporter, CeresEngine::OBJSceneImporter, CeresEngine::ShaderImporterImpl, and CeresEngine::StbiTextureImporter.

◆ import() [2/2]

template<typename T , typename O = ResourceImportOptions>
Async< ImportedResources > CeresEngine::TResourceImporter< T, O >::import ( const ResourceURL url,
const ResourceImportOptions options 
)
inlinefinalvirtual

Imports a resource from a URL.

Parameters
urlThe URL to import the resource from.
Returns
A continuable that returns once the resource has been imported.

Implements CeresEngine::ResourceImporter.

◆ ResourceImporter()

template<typename T , typename O = ResourceImportOptions>
CeresEngine::ResourceImporter::ResourceImporter ( ResourceManager resourceManager)
explicit

Creates a new resource importer.

Parameters
resourceManagerThe owning resource manager.

The documentation for this class was generated from the following file: