CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CeresEngine::ResourceImporter2 Class Referenceabstract

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

Public Member Functions

 ResourceImporter2 (ResourceManager &resourceManager)
 Creates a new resource importer.
 
virtual ~ResourceImporter2 ()=default
 Destroys the resource importer.
 
virtual Async< Optional< ResourceImporterPeekResponse > > peek (const ResourceURL &url, const ResourceImporterPeekSession &session)=0
 Peeks the resource.
 
virtual Async< ImportedResourcesimportResource (const ResourceURL &url, ResourceImporterSession &session)=0
 Peeks the resource.
 

Protected Attributes

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.
 

Constructor & Destructor Documentation

◆ ResourceImporter2()

CeresEngine::ResourceImporter2::ResourceImporter2 ( ResourceManager resourceManager)
explicit

Creates a new resource importer.

Parameters
resourceManagerThe owning resource manager.

◆ ~ResourceImporter2()

virtual CeresEngine::ResourceImporter2::~ResourceImporter2 ( )
virtualdefault

Destroys the resource importer.

Member Function Documentation

◆ importResource()

virtual Async< ImportedResources > CeresEngine::ResourceImporter2::importResource ( const ResourceURL url,
ResourceImporterSession session 
)
pure virtual

Peeks the resource.

Note
The session object reference is valid until the returned Async object completes execution.

◆ peek()

virtual Async< Optional< ResourceImporterPeekResponse > > CeresEngine::ResourceImporter2::peek ( const ResourceURL url,
const ResourceImporterPeekSession session 
)
pure virtual

Peeks the resource.

The given stream is not the same stream returned from the URLResponse, but is a stream that can read up to 4096 bytes from the stream, from an internal cache.

Member Data Documentation

◆ mExecutionContext

ExecutionContext& CeresEngine::ResourceImporter2::mExecutionContext
protected

The execution context to perform asynchronous resource operations on.

◆ mResourceManager

ResourceManager& CeresEngine::ResourceImporter2::mResourceManager
protected

The owning resource manager.

Can be used to import/load dependent resources.

◆ mURLSession

URLSession& CeresEngine::ResourceImporter2::mURLSession
protected

The URL session to be used to load resources.


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