Open 3D Engine AzCore API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AZ::IO::FileRequest Class Referencefinal

Public Types

enum class  Usage : u8 { }
 
using CommandVariant = Requests::CommandVariant
 
using OnCompletionCallback = AZStd::function< void(FileRequest &request)>
 

Public Member Functions

 AZ_CLASS_ALLOCATOR (FileRequest, SystemAllocator)
 
void CreateRequestLink (FileRequestPtr &&request)
 
void CreateRequestPathStore (FileRequest *parent, RequestPath path)
 
void CreateReadRequest (RequestPath path, void *output, u64 outputSize, u64 offset, u64 size, AZStd::chrono::steady_clock::time_point deadline, IStreamerTypes::Priority priority)
 
void CreateReadRequest (RequestPath path, IStreamerTypes::RequestMemoryAllocator *allocator, u64 offset, u64 size, AZStd::chrono::steady_clock::time_point deadline, IStreamerTypes::Priority priority)
 
void CreateRead (FileRequest *parent, void *output, u64 outputSize, const RequestPath &path, u64 offset, u64 size, bool sharedRead=false)
 
void CreateCompressedRead (FileRequest *parent, const CompressionInfo &compressionInfo, void *output, u64 readOffset, u64 readSize)
 
void CreateCompressedRead (FileRequest *parent, CompressionInfo &&compressionInfo, void *output, u64 readOffset, u64 readSize)
 
void CreateWait (FileRequest *parent)
 
void CreateFileExistsCheck (const RequestPath &path)
 
void CreateFileMetaDataRetrieval (const RequestPath &path)
 
void CreateCancel (FileRequestPtr target)
 
void CreateReschedule (FileRequestPtr target, AZStd::chrono::steady_clock::time_point newDeadline, IStreamerTypes::Priority newPriority)
 
void CreateFlush (RequestPath path)
 
void CreateFlushAll ()
 
void CreateDedicatedCacheCreation (RequestPath path, const FileRange &range={}, FileRequest *parent=nullptr)
 
void CreateDedicatedCacheDestruction (RequestPath path, const FileRange &range={}, FileRequest *parent=nullptr)
 
void CreateReport (AZStd::vector< AZ::IO::Statistic > &output, IStreamerTypes::ReportType reportType)
 
void CreateCustom (AZStd::any data, bool failWhenUnhandled=true, FileRequest *parent=nullptr)
 
void SetCompletionCallback (OnCompletionCallback callback)
 
CommandVariantGetCommand ()
 
const CommandVariantGetCommand () const
 
IStreamerTypes::RequestStatus GetStatus () const
 
void SetStatus (IStreamerTypes::RequestStatus newStatus)
 
FileRequestGetParent ()
 
const FileRequestGetParent () const
 
size_t GetNumDependencies () const
 
bool FailsWhenUnhandled () const
 Whether or not this request should fail if no node in the chain has picked up the request.
 
template<typename T >
T * GetCommandFromChain ()
 Checks the chain of request for the provided command. Returns the command if found, otherwise null.
 
template<typename T >
const T * GetCommandFromChain () const
 Checks the chain of request for the provided command. Returns the command if found, otherwise null.
 
bool WorksOn (FileRequestPtr &request) const
 Determines if this request is contributing to the external request.
 
size_t GetPendingId () const
 
void SetEstimatedCompletion (AZStd::chrono::steady_clock::time_point time)
 
AZStd::chrono::steady_clock::time_point GetEstimatedCompletion () const
 

Static Public Member Functions

static constexpr size_t GetMaxNumDependencies ()
 

Static Public Attributes

static constexpr AZStd::chrono::steady_clock::time_point s_noDeadlineTime = AZStd::chrono::steady_clock::time_point::max()
 

Friends

class StreamerContext
 
class ExternalFileRequest
 

Member Function Documentation

◆ GetPendingId()

size_t AZ::IO::FileRequest::GetPendingId ( ) const

Returns the id that's assigned to the request when it was added to the pending queue. The id will always increment so a smaller id means it was originally queued earlier.

◆ SetEstimatedCompletion()

void AZ::IO::FileRequest::SetEstimatedCompletion ( AZStd::chrono::steady_clock::time_point  time)

Set the estimated completion time for this request and it's immediate parent. The general approach to getting the final estimation is to bubble up the estimation, with ever entry in the stack adding it's own additional delay.


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