88 :
resources({ImportedResource(std::move(resource), suggestedUUID, std::move(suggestedName))}) {}
94 :
resources({ImportedResource(std::move(resource), suggestedUUID, std::move(suggestedName))}) {}
99 :
resources({ImportedResource(std::move(resource), suggestedUUID, std::move(suggestedName))}) {}
105 :
resources({ImportedResource(std::move(resource), suggestedUUID, std::move(suggestedName))}) {}
#define CE_EXPLICIT(EXPR)
Definition Macros.hpp:413
A context for function object execution.
Definition ExecutionContext.hpp:90
Definition ResourceHandle.hpp:166
Definition ResourceImporter.hpp:162
virtual ~ResourceImporter2()=default
Destroys the resource importer.
URLSession & mURLSession
The URL session to be used to load resources.
Definition ResourceImporter.hpp:169
virtual Async< Optional< ResourceImporterPeekResponse > > peek(const ResourceURL &url, const ResourceImporterPeekSession &session)=0
Peeks the resource.
ResourceImporter2(ResourceManager &resourceManager)
Creates a new resource importer.
ResourceManager & mResourceManager
The owning resource manager.
Definition ResourceImporter.hpp:166
virtual Async< ImportedResources > importResource(const ResourceURL &url, ResourceImporterSession &session)=0
Peeks the resource.
ExecutionContext & mExecutionContext
The execution context to perform asynchronous resource operations on.
Definition ResourceImporter.hpp:172
Primary class used to implement parsers and imports for common file formats to engine resources.
Definition ResourceImporter.hpp:196
ResourceImporter(ResourceManager &resourceManager)
Creates a new resource importer.
ResourceManager & mResourceManager
The owning resource manager.
Definition ResourceImporter.hpp:200
ExecutionContext & mExecutionContext
The execution context to perform asynchronous resource operations on.
Definition ResourceImporter.hpp:206
URLSession & mURLSession
The URL session to be used to load resources.
Definition ResourceImporter.hpp:203
virtual ~ResourceImporter()=default
Destroys the resource importer.
SupportStatus
An enumeration that contains the possible importer support status.
Definition ResourceImporter.hpp:225
@ Generic
Indicates that the format is supported by the importer, but it uses a generic parser.
@ Unsupported
The format is unsupported and the importer don't know how to interpret the data.
@ Supported
Indicates that the format is supported by the importer.
virtual Async< SupportStatus > supports(const ResourceURL &url)=0
Checks if the import supports the given resource.
The ResourceManager is the main class responsible for managing and handling all resources in the engi...
Definition ResourceManager.hpp:47
Creates a new resource importer.
Definition ResourceImporter.hpp:248
A Uniform Resource Identifier (URI) is a unique sequence of characters that identifies a logical or p...
Definition URI.hpp:54
The metadata associated with the response to a URL load request, independent of protocol and URL sche...
Definition URLSession.hpp:245
An object that coordinates a group of related, network data transfer tasks.
Definition URLSession.hpp:399
Definition Variant.hpp:15
Definition Application.hpp:19
std::unique_ptr< T, Deleter > UPtr
UPtr is a smart pointer that owns and manages another object through a pointer and disposes of that o...
Definition SmartPtr.hpp:28
std::shared_ptr< T > SPtr
SPtr is a smart pointer that retains shared ownership of an object through a pointer.
Definition SmartPtr.hpp:37
cti::continuable< Args... > Async
Defines a non-copyable continuation type which uses the function2 backend for type erasure.
Definition Async.hpp:22
std::vector< T, ScopedAllocatorAdaptor< StdAllocator< T, RawAllocator > > > Vector
Vector is a sequence container that encapsulates dynamic size arrays.
Definition Vector.hpp:17
auto move(Vector3 position)
Moves a entity to the given position.
Definition Helpers.hpp:22
::CeresEngine::ResourceHandle< Resource > HResource
Definition Forward.hpp:47
SPtr< Resource > ResourcePtr
Definition Forward.hpp:47
constexpr size_t hash(const T &v)
Generates a hash for the provided type.
Definition Hash.hpp:25
A single resource imported by an importer.
Definition ResourceImporter.hpp:28
UUID suggestedUUID
A suggested UUID for the resource.
Definition ResourceImporter.hpp:36
String suggestedName
A suggested name for the imported resource.
Definition ResourceImporter.hpp:39
Variant< HResource, ResourcePtr > resource
The primary imported resource.
Definition ResourceImporter.hpp:30
ImportedResource()=default
Creates a new empty ImportedResource struct.
A structure that contains the imported resources returned by an importer.
Definition ResourceImporter.hpp:65
ImportedResources()=default
Creates a new empty ImportedResources struct.
Vector< ImportedResource > resources
The resources returned by the importer.
Definition ResourceImporter.hpp:68
Definition ResourceImporter.hpp:108
const ResourceImportOptions & options
Definition ResourceImporter.hpp:110
ResourceTypeInfo desiredResource
Definition ResourceImporter.hpp:109
A structure that contains import options that describes how a resource should be imported.
Definition ResourceImportOptions.hpp:16
Definition ResourceImporter.hpp:130
UPtr< ResourceImportOptions > importOptions
A pointer to import options from the peeking.
Definition ResourceImporter.hpp:132
Definition ResourceImporter.hpp:113
const ResourceTypeInfo * typeInfo
Specifies the type of resource to import.
Definition ResourceImporter.hpp:116
URLResponse urlResponse
The URL response for the request that may have been performed for file peeking.
Definition ResourceImporter.hpp:121
InputStream inputStream
Points to a input stream that cam be used for peeking.
Definition ResourceImporter.hpp:127
A structure that specifies data for an import session.
Definition ResourceImporter.hpp:136
const ResourceTypeInfo * typeInfo
Specifies the type of resource to import.
Definition ResourceImporter.hpp:143
const UPtr< ResourceImportOptions > importOptions
A pointer to the import options to be used for the request.
Definition ResourceImporter.hpp:139
URLResponse urlResponse
The URL response for the request that may have been performed for file peeking.
Definition ResourceImporter.hpp:153
ResourceImporter *const importer
The importer that successfully peeked the file.
Definition ResourceImporter.hpp:148
InputStream inputStream
Only defined if urlResponse is defined.
Definition ResourceImporter.hpp:159
A structure that describes type information for a resource.
Definition Resource.hpp:63
Represents a universally unique identifier (UUID).
Definition UUID.hpp:27