UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FFileCacheHandle Class Reference
+ Inheritance diagram for FFileCacheHandle:

Public Member Functions

 FFileCacheHandle (IAsyncReadFileHandle *InHandle, int64 InBaseOffset)
 
virtual ~FFileCacheHandle () override
 
template<typename BlockIDType >
PRAGMA_DISABLE_UNSAFE_TYPECAST_WARNINGS BlockIDType GetBlock (int64 Offset)
 
template<typename BlockIDType >
PRAGMA_RESTORE_UNSAFE_TYPECAST_WARNINGS int32 GetNumBlocks (int64 Offset, int64 Size)
 
template<typename BlockIDType >
int64 GetBlockOffset (int64 Offset)
 
template<typename BlockIDType >
int64 GetBlockSize (int64 Offset, int64 Size)
 
virtual IMemoryReadStreamRef ReadData (FGraphEventArray &OutCompletionEvents, int64 Offset, int64 BytesToRead, EAsyncIOPriorityAndFlags Priority) override
 
virtual FGraphEventRef PreloadData (const FFileCachePreloadEntry *PreloadEntries, int32 NumEntries, EAsyncIOPriorityAndFlags Priority) override
 
IMemoryReadStreamRef ReadDataUncached (FGraphEventArray &OutCompletionEvents, int64 Offset, int64 BytesToRead, EAsyncIOPriorityAndFlags Priority)
 
void WaitAll () override
 
void Evict (CacheLineID Line)
 
- Public Member Functions inherited from IFileCacheHandle
virtual ~IFileCacheHandle ()
 

Additional Inherited Members

- Static Public Member Functions inherited from IFileCacheHandle
static CORE_API void EvictAll ()
 
static CORE_API IFileCacheHandleCreateFileCacheHandle (const TCHAR *InFileName, int64 InBaseOffset=0)
 
static CORE_API IFileCacheHandleCreateFileCacheHandle (IAsyncReadFileHandle *FileHandle, int64 InBaseOffset=0)
 
static CORE_API int64 GetFileCacheSize ()
 

Constructor & Destructor Documentation

◆ FFileCacheHandle()

FFileCacheHandle::FFileCacheHandle ( IAsyncReadFileHandle InHandle,
int64  InBaseOffset 
)
explicit

◆ ~FFileCacheHandle()

FFileCacheHandle::~FFileCacheHandle ( )
overridevirtual

Member Function Documentation

◆ Evict()

void FFileCacheHandle::Evict ( CacheLineID  Line)

◆ GetBlock()

template<typename BlockIDType >
PRAGMA_DISABLE_UNSAFE_TYPECAST_WARNINGS BlockIDType FFileCacheHandle::GetBlock ( int64  Offset)
inline

◆ GetBlockOffset()

template<typename BlockIDType >
int64 FFileCacheHandle::GetBlockOffset ( int64  Offset)
inline

◆ GetBlockSize()

template<typename BlockIDType >
int64 FFileCacheHandle::GetBlockSize ( int64  Offset,
int64  Size 
)
inline

◆ GetNumBlocks()

template<typename BlockIDType >
PRAGMA_RESTORE_UNSAFE_TYPECAST_WARNINGS int32 FFileCacheHandle::GetNumBlocks ( int64  Offset,
int64  Size 
)
inline

◆ PreloadData()

FGraphEventRef FFileCacheHandle::PreloadData ( const FFileCachePreloadEntry PreloadEntries,
int32  NumEntries,
EAsyncIOPriorityAndFlags  Priority 
)
overridevirtual

Implements IFileCacheHandle.

◆ ReadData()

IMemoryReadStreamRef FFileCacheHandle::ReadData ( FGraphEventArray OutCompletionEvents,
int64  Offset,
int64  BytesToRead,
EAsyncIOPriorityAndFlags  Priority 
)
overridevirtual

Read a byte range form the file. This can be a high-throughput operation and done lots of times for small reads. The system will handle this efficiently.

Parameters
OutCompletionEventsMust wait until these events are complete before returned data is valid
Returns
Memory stream that contains the requested range. May return nullptr in rare cases if the request could not be serviced Data read from this stream will not be valid until all events returned in OutCompletionEvents are complete

Implements IFileCacheHandle.

◆ ReadDataUncached()

IMemoryReadStreamRef FFileCacheHandle::ReadDataUncached ( FGraphEventArray OutCompletionEvents,
int64  Offset,
int64  BytesToRead,
EAsyncIOPriorityAndFlags  Priority 
)

◆ WaitAll()

void FFileCacheHandle::WaitAll ( )
overridevirtual

Wait until all outstanding read requests complete.

Implements IFileCacheHandle.


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