Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
FArchiveFileReaderGeneric Class Reference

#include <FileManagerGeneric.h>

+ Inheritance diagram for FArchiveFileReaderGeneric:
+ Collaboration diagram for FArchiveFileReaderGeneric:

Public Member Functions

 FArchiveFileReaderGeneric (IFileHandle *InHandle, const TCHAR *InFilename, int64 InSize, uint32 InBufferSize=PLATFORM_FILE_READER_BUFFER_SIZE, uint32 InFlags=FILEREAD_None)
 
 ~FArchiveFileReaderGeneric ()
 
virtual void Seek (int64 InPos) override final
 
virtual int64 Tell () override final
 
virtual int64 TotalSize () override final
 
virtual bool Close () override final
 
virtual void Serialize (void *V, int64 Length) override final
 
virtual FString GetArchiveName () const override
 
virtual void FlushCache () override final
 
virtual bool Precache (int64 PrecacheOffset, int64 PrecacheSize) override
 
- Public Member Functions inherited from FArchive
 FArchive ()=default
 
 FArchive (const FArchive &)=default
 
FArchiveoperator= (const FArchive &ArchiveToCopy)=default
 
 ~FArchive ()=default
 
virtual FArchiveoperator<< (FName &Value)
 
virtual FArchiveoperator<< (FText &Value)
 
virtual FArchiveoperator<< (UObject *&Value)
 
virtual FArchiveoperator<< (FField *&Value)
 
template<class T >
FORCEINLINE FArchiveoperator<< (TCheckedObjPtr< T > &Value)
 
virtual FArchiveoperator<< (struct FLazyObjectPtr &Value)
 
virtual FArchiveoperator<< (struct FObjectPtr &Value)
 
virtual FArchiveoperator<< (struct FSoftObjectPtr &Value)
 
virtual FArchiveoperator<< (struct FSoftObjectPath &Value)
 
virtual FArchiveoperator<< (struct FWeakObjectPtr &Value)
 
virtual void ForceBlueprintFinalization ()
 
virtual void SerializeBits (void *V, int64 LengthBits)
 
virtual void SerializeInt (uint32 &Value, uint32 Max)
 
virtual void SerializeIntPacked (uint32 &Value)
 
virtual void Preload (UObject *Object)
 
FArchiveStateGetArchiveState ()
 
const FArchiveStateGetArchiveState () const
 
virtual void AttachBulkData (UObject *Owner, FBulkData *BulkData)
 
virtual void AttachBulkData (UE::Serialization::FEditorBulkData *BulkData)
 
virtual void DetachBulkData (FBulkData *BulkData, bool bEnsureBulkDataIsLoaded)
 
virtual void DetachBulkData (UE::Serialization::FEditorBulkData *BulkData, bool bEnsureBulkDataIsLoaded)
 
virtual bool SerializeBulkData (FBulkData &BulkData, const struct FBulkDataSerializationParams &Params)
 
virtual bool IsProxyOf (FArchive *InOther) const
 
virtual bool SetCompressionMap (TArray< struct FCompressedChunk > *CompressedChunks, ECompressionFlags CompressionFlags)
 
virtual void Flush ()
 
void SerializeCompressed (void *V, int64 Length, FName CompressionFormatCannotChange, ECompressionFlags Flags=COMPRESS_NoFlags, bool bTreatBufferAsFileReader=false)
 
void SerializeCompressedNew (void *V, int64 Length, FName CompressionFormatToEncode, FName CompressionFormatToDecodeOldV1Files, ECompressionFlags Flags=COMPRESS_NoFlags, bool bTreatBufferAsFileReader=false, int64 *OutPartialReadLength=nullptr)
 
void SerializeCompressedNew (void *V, int64 Length)
 
void ByteSwap (void *V, int32 Length)
 
FORCEINLINE FArchiveByteOrderSerialize (void *V, int32 Length)
 
void StartSerializingDefaults ()
 
void StopSerializingDefaults ()
 
virtual void MarkScriptSerializationStart (const UObject *Obj)
 
virtual void MarkScriptSerializationEnd (const UObject *Obj)
 
virtual void MarkSearchableName (const UObject *TypeObject, const FName &ValueName) const
 
template<typename FmtType , typename... Types>
void Logf (const FmtType &Fmt, Types... Args)
 
virtual void UsingCustomVersion (const struct FGuid &Guid)
 
virtual FArchiveGetCacheableArchive ()
 
virtual void PushSerializedProperty (struct FProperty *InProperty, const bool bIsEditorOnlyProperty)
 
virtual void PopSerializedProperty (struct FProperty *InProperty, const bool bIsEditorOnlyProperty)
 
virtual bool AttachExternalReadDependency (FExternalReadCallback &ReadCallback)
 
template<SIZE_T Size>
FORCEINLINE bool FastPathLoad (void *InDest)
 
virtual void PushFileRegionType (EFileRegionType Type)
 
virtual void PopFileRegionType ()
 
void SetArchiveState (const FArchiveState &InState)
 
void SetError ()
 
void ClearError ()
 
virtual FArchiveStateGetInnermostState ()
 
virtual void CountBytes (SIZE_T InNum, SIZE_T InMax)
 
virtual FLinkerGetLinker ()
 
virtual bool AtEnd ()
 
FORCEINLINE bool IsByteSwapping ()
 
void ThisContainsCode ()
 
void ThisContainsMap ()
 
void ThisRequiresLocalizationGather ()
 
virtual UObjectGetArchetypeFromLoader (const UObject *Obj)
 
FORCEINLINE FPackageFileVersion UEVer () const
 
FORCEINLINE int32 UE4Ver () const
 
FORCEINLINE int32 LicenseeUEVer () const
 
FORCEINLINE FEngineVersionBase EngineVer () const
 
uint32 EngineNetVer () const
 
uint32 GameNetVer () const
 
int32 CustomVer (const struct FGuid &Key) const
 
FORCEINLINE bool IsLoading () const
 
FORCEINLINE bool IsLoadingFromCookedPackage () const
 
FORCEINLINE bool IsSaving () const
 
FORCEINLINE bool IsTransacting () const
 
FORCEINLINE bool IsTextFormat () const
 
FORCEINLINE bool WantBinaryPropertySerialization () const
 
FORCEINLINE bool UseUnversionedPropertySerialization () const
 
FORCEINLINE bool IsForcingUnicode () const
 
FORCEINLINE bool IsPersistent () const
 
FORCEINLINE bool GetError () const
 
FORCEINLINE bool IsError () const
 
FORCEINLINE bool IsCriticalError () const
 
FORCEINLINE bool ContainsCode () const
 
FORCEINLINE bool ContainsMap () const
 
FORCEINLINE bool RequiresLocalizationGather () const
 
FORCEINLINE bool ForceByteSwapping () const
 
FORCEINLINE bool IsSerializingDefaults () const
 
FORCEINLINE bool IsIgnoringArchetypeRef () const
 
FORCEINLINE bool DoDelta () const
 
FORCEINLINE bool DoIntraPropertyDelta () const
 
FORCEINLINE bool IsIgnoringOuterRef () const
 
FORCEINLINE bool IsIgnoringClassGeneratedByRef () const
 
FORCEINLINE bool IsIgnoringClassRef () const
 
FORCEINLINE bool IsAllowingLazyLoading () const
 
FORCEINLINE bool IsObjectReferenceCollector () const
 
FORCEINLINE bool IsModifyingWeakAndStrongReferences () const
 
FORCEINLINE bool IsCountingMemory () const
 
FORCEINLINE uint32 GetPortFlags () const
 
FORCEINLINE bool HasAnyPortFlags (uint32 Flags) const
 
FORCEINLINE bool HasAllPortFlags (uint32 Flags) const
 
FORCEINLINE uint32 GetDebugSerializationFlags () const
 
FORCEINLINE bool ShouldSkipBulkData () const
 
FORCEINLINE int64 GetMaxSerializeSize () const
 
virtual const FCustomVersionContainerGetCustomVersions () const
 
virtual void SetCustomVersions (const FCustomVersionContainer &CustomVersionContainer)
 
virtual void ResetCustomVersions ()
 
void SetCustomVersion (const struct FGuid &Key, int32 Version, FName FriendlyName)
 
void SetByteSwapping (bool Enabled)
 
void SetPortFlags (uint32 InPortFlags)
 
void SetDebugSerializationFlags (uint32 InCustomFlags)
 
bool IsFilterEditorOnly () const
 
virtual void SetFilterEditorOnly (bool InFilterEditorOnly)
 
bool IsSaveGame () const
 
FORCEINLINE bool IsNetArchive () const
 
FORCEINLINE bool IsCooking () const
 
FORCEINLINE const ITargetPlatformCookingTarget () const
 
void SetCookData (FArchiveCookData *InCookData)
 
FArchiveCookDataGetCookData ()
 
FORCEINLINE FArchiveCookContextGetCookContext ()
 
virtual bool UseToResolveEnumerators () const
 
virtual bool ShouldSkipProperty (const FProperty *InProperty) const
 
virtual void SetSerializedProperty (FProperty *InProperty)
 
FORCEINLINE struct FPropertyGetSerializedProperty () const
 
void GetSerializedPropertyChain (TArray< struct FProperty * > &OutProperties) const
 
FORCEINLINE const FArchiveSerializedPropertyChainGetSerializedPropertyChain () const
 
virtual void SetSerializedPropertyChain (const FArchiveSerializedPropertyChain *InSerializedPropertyChain, struct FProperty *InSerializedPropertyOverride=nullptr)
 
virtual void SetSerializeContext (FUObjectSerializeContext *InLoadContext)
 
virtual FUObjectSerializeContextGetSerializeContext ()
 
virtual void Reset ()
 
virtual void SetIsLoading (bool bInIsLoading)
 
virtual void SetIsLoadingFromCookedPackage (bool bInIsLoadingFromCookedPackage)
 
virtual void SetIsSaving (bool bInIsSaving)
 
virtual void SetIsTransacting (bool bInIsTransacting)
 
virtual void SetIsTextFormat (bool bInIsTextFormat)
 
virtual void SetWantBinaryPropertySerialization (bool bInWantBinaryPropertySerialization)
 
virtual void SetUseUnversionedPropertySerialization (bool bInUseUnversioned)
 
virtual void SetForceUnicode (bool bInForceUnicode)
 
virtual void SetIsPersistent (bool bInIsPersistent)
 
virtual void SetUEVer (FPackageFileVersion InVer)
 
FORCEINLINE void SetUE4Ver (int32 InVer)
 
virtual void SetLicenseeUEVer (int32 InVer)
 
virtual void SetEngineVer (const FEngineVersionBase &InVer)
 
virtual void SetEngineNetVer (const uint32 InEngineNetVer)
 
virtual void SetGameNetVer (const uint32 InGameNetVer)
 
FORCEINLINE bool ShouldSkipCompilingAssets () const
 

Protected Types

enum  { bPrecacheAsSoonAsPossible = 0 }
 

Protected Member Functions

bool InternalPrecache (int64 PrecacheOffset, int64 PrecacheSize)
 
virtual bool SeekLowLevel (int64 InPos)
 
virtual void CloseLowLevel ()
 
virtual void ReadLowLevel (uint8 *Dest, int64 CountToRead, int64 &OutBytesRead)
 
bool IsSilent () const
 
- Protected Member Functions inherited from FArchive
void SetShouldSkipCompilingAssets (bool Enabled)
 

Protected Attributes

FString Filename
 
int64 Size
 
int64 Pos
 
int64 BufferBase
 
TUniquePtr< IFileHandleHandle
 
TArray64< uint8BufferArray
 
int64 BufferSize
 
uint32 Flags
 
bool bFirstReadAfterSeek
 

Friends

class FArchiveFileReaderGenericTest
 

Additional Inherited Members

- Public Attributes inherited from FArchive
FFastPathLoadBufferActiveFPLB
 
FFastPathLoadBuffer InlineFPLB
 
uint8 ArContainsCode: 1
 
uint8 ArContainsMap: 1
 
uint8 ArRequiresLocalizationGather: 1
 
uint8 ArForceByteSwapping: 1
 
uint8 ArIgnoreArchetypeRef: 1
 
uint8 ArNoDelta: 1
 
uint8 ArNoIntraPropertyDelta: 1
 
uint8 ArIgnoreOuterRef: 1
 
uint8 ArIgnoreClassGeneratedByRef: 1
 
uint8 ArIgnoreClassRef: 1
 
uint8 ArAllowLazyLoading: 1
 
uint8 ArIsObjectReferenceCollector: 1
 
uint8 ArIsModifyingWeakAndStrongReferences: 1
 
uint8 ArIsCountingMemory: 1
 
uint8 ArShouldSkipBulkData: 1
 
uint8 ArIsFilterEditorOnly: 1
 
uint8 ArIsSaveGame: 1
 
uint8 ArIsNetArchive: 1
 
uint8 ArUseCustomPropertyList: 1
 
int32 ArSerializingDefaults
 
uint32 ArPortFlags
 
int64 ArMaxSerializeSize
 
const struct FCustomPropertyListNodeArCustomPropertyList
 
- Static Protected Member Functions inherited from FArchive
static void LinkProxy (FArchiveState &Inner, FArchiveState &Proxy)
 
static void UnlinkProxy (FArchiveState &Inner, FArchiveState &Proxy)
 

Detailed Description

Definition at line 226 of file FileManagerGeneric.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
protected
Enumerator
bPrecacheAsSoonAsPossible 

Definition at line 290 of file FileManagerGeneric.h.

Constructor & Destructor Documentation

◆ FArchiveFileReaderGeneric()

FArchiveFileReaderGeneric::FArchiveFileReaderGeneric ( IFileHandle * InHandle,
const TCHAR * InFilename,
int64 InSize,
uint32 InBufferSize = PLATFORM_FILE_READER_BUFFER_SIZE,
uint32 InFlags = FILEREAD_None )

◆ ~FArchiveFileReaderGeneric()

FArchiveFileReaderGeneric::~FArchiveFileReaderGeneric ( )

Member Function Documentation

◆ Close()

virtual bool FArchiveFileReaderGeneric::Close ( )
finaloverridevirtual

Attempts to close and finalize any handles used for backing data storage, returns true if it succeeded.

Reimplemented from FArchive.

◆ CloseLowLevel()

virtual void FArchiveFileReaderGeneric::CloseLowLevel ( )
protectedvirtual

Close the file handle

◆ FlushCache()

virtual void FArchiveFileReaderGeneric::FlushCache ( )
finaloverridevirtual

Flushes cache and frees internal data.

Reimplemented from FArchive.

◆ GetArchiveName()

virtual FString FArchiveFileReaderGeneric::GetArchiveName ( ) const
inlineoverridevirtual

Returns the name of the Archive. Useful for getting the name of the package a struct or object is in when a loading error occurs.

This is overridden for the specific Archive Types

Reimplemented from FArchive.

Definition at line 243 of file FileManagerGeneric.h.

◆ InternalPrecache()

bool FArchiveFileReaderGeneric::InternalPrecache ( int64 PrecacheOffset,
int64 PrecacheSize )
protected

◆ IsSilent()

bool FArchiveFileReaderGeneric::IsSilent ( ) const
inlineprotected

Returns true if the archive should suppress logging in case of error

Definition at line 270 of file FileManagerGeneric.h.

◆ Precache()

virtual bool FArchiveFileReaderGeneric::Precache ( int64 PrecacheOffset,
int64 PrecacheSize )
overridevirtual

Hint the archive that the region starting at passed in offset and spanning the passed in size is going to be read soon and should be precached.

The function returns whether the precache operation has completed or not which is an important hint for code knowing that it deals with potential async I/O. The archive is free to either not implement this function or only partially precache so it is required that given sufficient time the function will return true. Archives not based on async I/O should always return true.

This function will not change the current archive position.

Parameters
PrecacheOffsetOffset at which to begin precaching.
PrecacheSizeNumber of bytes to precache
Returns
false if precache operation is still pending, true otherwise

Reimplemented from FArchive.

◆ ReadLowLevel()

virtual void FArchiveFileReaderGeneric::ReadLowLevel ( uint8 * Dest,
int64 CountToRead,
int64 & OutBytesRead )
protectedvirtual

Platform specific read

Parameters
Dest- Buffer to fill in
CountToRead- Number of bytes to read
OutBytesRead- Bytes actually read

◆ Seek()

virtual void FArchiveFileReaderGeneric::Seek ( int64 InPos)
finaloverridevirtual

Attempts to set the current offset into backing data storage, this will do nothing if there is no storage.

Reimplemented from FArchive.

◆ SeekLowLevel()

virtual bool FArchiveFileReaderGeneric::SeekLowLevel ( int64 InPos)
protectedvirtual

Platform specific seek

Parameters
InPos- Offset from beginning of file to seek to
Returns
false on failure

◆ Serialize()

virtual void FArchiveFileReaderGeneric::Serialize ( void * V,
int64 Length )
finaloverridevirtual

Reimplemented from FArchive.

◆ Tell()

virtual int64 FArchiveFileReaderGeneric::Tell ( )
inlinefinaloverridevirtual

Returns the current location within the backing data storage, which can possibly be passed to Seek later to restore a read/write location. If this returns -1, there is no backing data storage and Seek will not function.

Reimplemented from FArchive.

Definition at line 233 of file FileManagerGeneric.h.

◆ TotalSize()

virtual int64 FArchiveFileReaderGeneric::TotalSize ( )
inlinefinaloverridevirtual

Returns total size of the backing data storage.

Reimplemented from FArchive.

Definition at line 237 of file FileManagerGeneric.h.

Friends And Related Symbol Documentation

◆ FArchiveFileReaderGenericTest

friend class FArchiveFileReaderGenericTest
friend

Definition at line 295 of file FileManagerGeneric.h.

Member Data Documentation

◆ bFirstReadAfterSeek

bool FArchiveFileReaderGeneric::bFirstReadAfterSeek
protected

Definition at line 288 of file FileManagerGeneric.h.

◆ BufferArray

TArray64<uint8> FArchiveFileReaderGeneric::BufferArray
protected

The contract for the BufferWindow and the low level pos is that if we have a BufferWindow and Pos is within it, then the LowLevel Pos is at the end of the BufferWindow If we do not have a BufferWindow, or Pos is outside of it, then LowLevel Pos is at Pos.

Definition at line 285 of file FileManagerGeneric.h.

◆ BufferBase

int64 FArchiveFileReaderGeneric::BufferBase
protected

Definition at line 279 of file FileManagerGeneric.h.

◆ BufferSize

int64 FArchiveFileReaderGeneric::BufferSize
protected

Definition at line 286 of file FileManagerGeneric.h.

◆ Filename

FString FArchiveFileReaderGeneric::Filename
protected

Filename for debugging purposes.

Definition at line 276 of file FileManagerGeneric.h.

◆ Flags

uint32 FArchiveFileReaderGeneric::Flags
protected

Definition at line 287 of file FileManagerGeneric.h.

◆ Handle

TUniquePtr<IFileHandle> FArchiveFileReaderGeneric::Handle
protected

Definition at line 280 of file FileManagerGeneric.h.

◆ Pos

int64 FArchiveFileReaderGeneric::Pos
protected

Definition at line 278 of file FileManagerGeneric.h.

◆ Size

int64 FArchiveFileReaderGeneric::Size
protected

Definition at line 277 of file FileManagerGeneric.h.


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