engine
 
载入中...
搜索中...
未找到
Public 成员函数 | 静态 Public 成员函数 | 所有成员列表
IFileCacheHandle类 参考abstract

All methods may be safely called from multiple threads simultaneously, unless otherwise noted 更多...

#include <FileCache.h>

Public 成员函数

virtual IMemoryReadStreamRef ReadData (FGraphEventArray &OutCompletionEvents, int64 Offset, int64 BytesToRead, EAsyncIOPriorityAndFlags Priority)=0
 Read a byte range form the file. 更多...
 
virtual void WaitAll ()=0
 Wait until all outstanding read requests complete.
 

静态 Public 成员函数

static CORE_API IFileCacheHandle * CreateFileCacheHandle (const TCHAR *InFileName)
 Create a IFileCacheHandle from a filename. 更多...
 
static CORE_API IFileCacheHandle * CreateFileCacheHandle (IAsyncReadFileHandle *FileHandle)
 Create a IFileCacheHandle from a IAsyncReadFileHandle. 更多...
 
static CORE_API uint32 GetFileCacheSize ()
 Return size of underlying file cache in bytes.
 

详细描述

All methods may be safely called from multiple threads simultaneously, unless otherwise noted

Also note, if you create several IFileCacheHandle's to the same file on separate threads these will be considered as individual separate files from the cache point of view and thus each will have their own cache data allocated.

成员函数说明

◆ CreateFileCacheHandle() [1/2]

static CORE_API IFileCacheHandle * IFileCacheHandle::CreateFileCacheHandle ( const TCHAR *  InFileName)
static

Create a IFileCacheHandle from a filename.

参数
InFileNameA path to a file.
返回
A IFileCacheHandle that can be used to make read requests. This will be a nullptr if the target file can not be accessed for any given reason.

◆ CreateFileCacheHandle() [2/2]

static CORE_API IFileCacheHandle * IFileCacheHandle::CreateFileCacheHandle ( IAsyncReadFileHandle *  FileHandle)
static

Create a IFileCacheHandle from a IAsyncReadFileHandle.

参数
FileHandleA valid IAsyncReadFileHandle that has already been created elsewhere.
返回
A IFileCacheHandle that can be used to make read requests. This will be a nullptr if the FileHandle was not valid.

◆ ReadData()

virtual IMemoryReadStreamRef IFileCacheHandle::ReadData ( FGraphEventArray &  OutCompletionEvents,
int64  Offset,
int64  BytesToRead,
EAsyncIOPriorityAndFlags  Priority 
)
pure virtual

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.

参数
OutCompletionEventsMust wait until these events are complete before returned data is valid
返回
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

该类的文档由以下文件生成: