engine
 
载入中...
搜索中...
未找到
Public 成员函数 | 所有成员列表
FPakFileHandle< ReaderPolicy > 模板类 参考

File handle to read from pak file. 更多...

#include <IPlatformFilePak.h>

+ 类 FPakFileHandle< ReaderPolicy > 继承关系图:

Public 成员函数

virtual bool Flush (const bool bFullFlush=false) override
 Flushes file handle to disk. 更多...
 
 FPakFileHandle (const FPakFile &InPakFile, const FPakEntry &InPakEntry, FArchive *InPakReader, bool bIsSharedReader)
 Constructs pak file handle to read from pak. 更多...
 
 FPakFileHandle (const FPakFile &InPakFile, const FPakEntry &InPakEntry, TAcquirePakReaderFunction &InAcquirePakReaderFunction, bool bIsSharedReader)
 Constructs pak file handle to read from pak. 更多...
 
virtual bool Read (uint8 *Destination, int64 BytesToRead) override
 Read bytes from the file. 更多...
 
virtual bool Seek (int64 NewPosition) override
 Change the current write or read position. 更多...
 
virtual bool SeekFromEnd (int64 NewPositionRelativeToEnd) override
 Change the current write or read position, relative to the end of the file. 更多...
 
virtual int64 Size () override
 Return the total size of the file
 
virtual int64 Tell () override
 Return the current write or read position.
 
virtual bool Truncate (int64 NewSize) override
 Truncate the file to the given size (in bytes). 更多...
 
virtual bool Write (const uint8 *Source, int64 BytesToWrite) override
 Write bytes to the file. 更多...
 
virtual ~FPakFileHandle ()
 Destructor. 更多...
 
- Public 成员函数 继承自 IFileHandle
virtual bool Flush (const bool bFullFlush=false)=0
 Flushes file handle to disk. 更多...
 
virtual bool Read (uint8 *Destination, int64 BytesToRead)=0
 Read bytes from the file. 更多...
 
virtual bool Seek (int64 NewPosition)=0
 Change the current write or read position. 更多...
 
virtual bool SeekFromEnd (int64 NewPositionRelativeToEnd=0)=0
 Change the current write or read position, relative to the end of the file. 更多...
 
virtual int64 Size ()
 Return the total size of the file
 
virtual int64 Tell ()=0
 Return the current write or read position.
 
virtual bool Truncate (int64 NewSize)=0
 Truncate the file to the given size (in bytes). 更多...
 
virtual bool Write (const uint8 *Source, int64 BytesToWrite)=0
 Write bytes to the file. 更多...
 
virtual ~IFileHandle ()
 Destructor, also the only way to close the file handle
 

详细描述

template<typename ReaderPolicy = FPakReaderPolicy<>>
class FPakFileHandle< ReaderPolicy >

File handle to read from pak file.

构造及析构函数说明

◆ FPakFileHandle() [1/2]

template<typename ReaderPolicy = FPakReaderPolicy<>>
FPakFileHandle< ReaderPolicy >::FPakFileHandle ( const FPakFile &  InPakFile,
const FPakEntry &  InPakEntry,
TAcquirePakReaderFunction &  InAcquirePakReaderFunction,
bool  bIsSharedReader 
)
inline

Constructs pak file handle to read from pak.

参数
InFilenameFilename
InPakEntryEntry in the pak file.
InAcquirePakReaderFunctionFunction that returns the archive to use for serialization. The result of this should not be cached, but reacquired on each serialization operation

◆ FPakFileHandle() [2/2]

template<typename ReaderPolicy = FPakReaderPolicy<>>
FPakFileHandle< ReaderPolicy >::FPakFileHandle ( const FPakFile &  InPakFile,
const FPakEntry &  InPakEntry,
FArchive *  InPakReader,
bool  bIsSharedReader 
)
inline

Constructs pak file handle to read from pak.

参数
InFilenameFilename
InPakEntryEntry in the pak file.
InPakFilePak file.

◆ ~FPakFileHandle()

template<typename ReaderPolicy = FPakReaderPolicy<>>
virtual FPakFileHandle< ReaderPolicy >::~FPakFileHandle ( )
inlinevirtual

Destructor.

Cleans up the reader archive if necessary.

成员函数说明

◆ Flush()

template<typename ReaderPolicy = FPakReaderPolicy<>>
virtual bool FPakFileHandle< ReaderPolicy >::Flush ( const bool  bFullFlush = false)
inlineoverridevirtual

Flushes file handle to disk.

参数
bFullFlushtrue to flush everything about the file (including its meta-data) with a strong guarantee that it will be on disk by the time this function returns, or false to let the operating/file system have more leeway about when the data actually gets written to disk
返回
true if operation completed successfully.

实现了 IFileHandle.

◆ Read()

template<typename ReaderPolicy = FPakReaderPolicy<>>
virtual bool FPakFileHandle< ReaderPolicy >::Read ( uint8 *  Destination,
int64  BytesToRead 
)
inlineoverridevirtual

Read bytes from the file.

参数
DestinationBuffer to holds the results, should be at least BytesToRead in size.
BytesToReadNumber of bytes to read into the destination.
返回
true if the operation completed successfully.

实现了 IFileHandle.

◆ Seek()

template<typename ReaderPolicy = FPakReaderPolicy<>>
virtual bool FPakFileHandle< ReaderPolicy >::Seek ( int64  NewPosition)
inlineoverridevirtual

Change the current write or read position.

参数
NewPositionnew write or read position
返回
true if the operation completed successfully.

实现了 IFileHandle.

◆ SeekFromEnd()

template<typename ReaderPolicy = FPakReaderPolicy<>>
virtual bool FPakFileHandle< ReaderPolicy >::SeekFromEnd ( int64  NewPositionRelativeToEnd)
inlineoverridevirtual

Change the current write or read position, relative to the end of the file.

参数
NewPositionRelativeToEndnew write or read position, relative to the end of the file should be <=0!
返回
true if the operation completed successfully.

实现了 IFileHandle.

◆ Truncate()

template<typename ReaderPolicy = FPakReaderPolicy<>>
virtual bool FPakFileHandle< ReaderPolicy >::Truncate ( int64  NewSize)
inlineoverridevirtual

Truncate the file to the given size (in bytes).

参数
NewSizeTruncated file size (in bytes).
返回
true if the operation completed successfully.

实现了 IFileHandle.

◆ Write()

template<typename ReaderPolicy = FPakReaderPolicy<>>
virtual bool FPakFileHandle< ReaderPolicy >::Write ( const uint8 *  Source,
int64  BytesToWrite 
)
inlineoverridevirtual

Write bytes to the file.

参数
SourceBuffer to write, should be at least BytesToWrite in size.
BytesToWriteNumber of bytes to write.
返回
true if the operation completed successfully.

实现了 IFileHandle.


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