FArchive

Base class for archives that can be used for loading, saving, and garbage collecting in a byte order neutral way.

Inheritance Hierarchy

FArchiveState

FArchive

FArchiveFileReaderGeneric

FMovieSceneArchiveFileReader

FArchiveFileWriterGeneric

FMovieSceneArchiveFileWriter

FArchiveLoadCompressedProxy

FArchiveMD5

FArchiveProxy

FActorDescArchive

FArchiveFromStructuredArchiveImpl

FArchiveUObjectFromStructuredArchiveImpl

FArchiveStackTraceWriter

FChaosArchive

FHierarchicalLogArchive

FMaterialResourceProxyReader

FNameAsStringIndexProxyArchive

FNameAsStringProxyArchive

FPropertyProxyArchive

FShaderSaveArchive

FArchiveSaveCompressedProxy

FArchiveUObject

FArchiveCountMem

FArchiveCrc32

FArchiveFindCulprit

FArchiveGenerateReferenceGraph

FArchiveHasReferences

FArchiveObjectCrc32

FZoneGraphObjectCRC32

FArchiveObjectPropertyMapper

FArchiveReferenceMarker

FArchiveReplaceObjectRefBase

FArchiveReplaceObjectRef

FArchiveReplaceObjectAndStructPropertyRef

FArchiveReplaceOrClearExternalReferences

FArchiveScriptReferenceCollector

FArchiveShowReferences

FArchiveTopLevelReferenceCollector

FDuplicateDataReader

FDuplicateDataWriter

FFindAssetsArchive

FFindReferencersArchive

FKeyBuilder

FLinkerLoad

FLinkerSave

FReferenceCollectorArchive

FSerializedObjectDataReader

FTransaction::FObjectRecord::FReader

FSerializedObjectDataWriterCommon

FDiffableObjectDataWriter

FSerializedObjectDataWriter

FTransaction::FObjectRecord::FWriter

FSoftObjectPathFixupArchive

FArchiveWithDelegate

FAsyncWriter

FBitArchive

FBitReader

FNetBitReader

FInBunch

FBitWriter

FBufferReaderBase

FBufferReader

FBufferReaderWithSHA

FBulkDataReader

FEditorBulkDataReader

FBufferWriter

FBuildVersionBuilder

FBulkDataWriter

FEditorBulkDataWriter

FHttpStreamFArchive

FLocalFileStreamFArchive

FMemoryArchive

FArrayReader

FConcertIdentifierRewriter

FConcertSyncObjectRewriter

FGLTFMemoryArchive

FLargeMemoryReader

FArchiveStackTraceReader

FLargeMemoryWriter

FArchiveStackTrace

FArchiveStackTraceMemoryWriter

FMemoryReader

FConcertIdentifierReader

FConcertSyncObjectReader

FMLAdapterMemoryReader

FMemoryReaderView

FObjectReader

FBinaryObjectReader

FStaticMemoryReader

TMemoryHasher

TMemoryWriter

FMemoryWriter

FConcertIdentifierWriter

FConcertSyncObjectWriter

FMaterialResourceMemoryWriter

FMLAdapterMemoryWriter

FObjectWriter

FBinaryObjectWriter

FMemoryWriter64

TBufferArchive

FBufferArchive

FNetworkFileArchive

FBufferArchive64

FOutputDeviceMemory::FOutputDeviceMemoryProxyArchive

FPreloadableArchive

FPreloadableFile

FPreloadableArchiveProxy

FStorageServerRequest

FStorageServerChunkBatchRequest

FStorageServerResponse

References

Module

Core

Header

/Engine/Source/Runtime/Core/Public/Serialization/Archive.h

Include

#include "Serialization/Archive.h"

Syntax

class FArchive : private FArchiveState

Remarks

Base class for archives that can be used for loading, saving, and garbage collecting in a byte order neutral way.

Constructors

Name Description

Public function

FArchive()

Public function

FArchive

(
    const FArchive&
)

Destructors

Name Description

Public function

~FArchive()

Functions

Name Description

Public function Virtual

void

 

AttachBulkData

Public function Virtual

void

 

AttachBulkData

(
    UObject* Owner,
    FBulkData* BulkData
)

Attaches/ associates the passed in bulk data object with the linker.

Public function Virtual

bool

 

AttachExternalReadDependency

(
    FExternalReadCallback& ReadCallbac...
)

Adds external read dependency

Public function

FArchive &

 

ByteOrderSerialize

(
    void* V,
    int32 Length
)

Serialize data of Length bytes, taking into account byte swapping if needed.

Public function

void

 

ByteSwap

(
    void* V,
    int32 Length
)

Used to do byte swapping on small items. This does not happen usually, so we don't want it inline.

Public function Virtual

bool

 

Close()

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

Public function Virtual

void

 

DetachBulkData

(
    FBulkData* BulkData,
    bool bEnsureBulkDataIsLoaded
)

Detaches the passed in bulk data object from the linker.

Public function Virtual

void

 

DetachBulkData

(
    UE::Serialization::FEditorBulkData ...,
    bool bEnsureBulkDataIsLoaded
)

Public function

bool

 

FastPathLoad

(
    void* InDest
)

Public function Virtual

void

 

Flush()

Attempts to finish writing any buffered data to disk/permanent storage.

Public function Virtual

void

 

FlushCache()

Flushes cache and frees internal data.

Public function Virtual

void

 

ForceBlueprintFinalization()

Inform the archive that a blueprint would like to force finalization, normally this is triggered by CDO load, but if there's no CDO we force finalization.

Public function Const

const FArchi...

 

GetArchiveState()

Public function

FArchiveStat...

 

GetArchiveState()

Returns the low level archive state for this archive.

Public function Virtual

FArchive ...

 

GetCacheableArchive()

Returns a pointer to an archive that represents the same data that the current archive covers, but that can be cached and reused later In the case of standard archives, this function will just return a pointer to itself.

Public function Virtual Const

bool

 

IsProxyOf

(
    FArchive* InOther
)

Determine if the given archive is a valid "child" of this archive.

Public function

void

 

Logf

(
    const FmtType& Fmt,
    Types... Args
)

Logf implementation for convenience.

Public function Virtual

void

 

MarkScriptSerializationEnd

(
    const UObject* Obj
)

Called when an object stops serializing property data using script serialization.

Public function Virtual

void

 

MarkScriptSerializationStart

(
    const UObject* Obj
)

Called when an object begins serializing property data using script serialization.

Public function Virtual Const

void

 

MarkSearchableName

(
    const TObjectPtr< const UObject >&...,
    const FName& ValueName
)

Called to register a reference to a specific name value, of type TypeObject (UEnum or UStruct normally).

Public function Virtual

void

 

PopDebugDataString()

Public function Virtual

void

 

PopFileRegionType()

Public function Virtual

void

 

PopSerializedProperty

(
    FProperty* InProperty,
    const bool bIsEditorOnlyProperty
)

Pop a property that was previously being serialized off the property stack

Public function Virtual

bool

 

Precache

(
    int64 PrecacheOffset,
    int64 PrecacheSize
)

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.

Public function Virtual

void

 

Preload

(
    UObject* Object
)

Tells the archive to attempt to preload the specified object so data can be loaded out of it.

Public function Virtual

void

 

PushDebugDataString

(
    const FName& DebugData
)

Debug stack storage if you want to add data to the archive for usage further down the serialization stack this should be used in conjunction with the FScopeAddDebugData struct

Public function Virtual

void

 

PushFileRegionType

(
    EFileRegionType Type
)

Called whilst cooking to provide file region hints to the cooker.

Public function Virtual

void

 

PushSerializedProperty

(
    FProperty* InProperty,
    const bool bIsEditorOnlyProperty
)

Push a property that is currently being serialized onto the property stack

Public function Virtual

void

 

Seek

(
    int64 InPos
)

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

Public function Virtual

void

 

Serialize

(
    void* V,
    int64 Length
)

Public function Virtual

void

 

SerializeBits

(
    void* V,
    int64 LengthBits
)

Protected function Virtual

void

 

SerializeBool

(
    bool& D
)

Serializes a Boolean value from or into an archive.

Public function Virtual

bool

 

SerializeBulkData

(
    FBulkData& BulkData,
    const FBulkDataSerializationParams ...
)

Serialize bulk data.

Public function

void

 

SerializeCompressed

(
    void* V,
    int64 Length,
    FName CompressionFormatCannotChange,
    ECompressionFlags Flags,
    bool bTreatBufferAsFileReader
)

Serializes and compresses/ uncompresses data.

Public function

void

 

SerializeCompressedNew

(
    void* V,
    int64 Length
)

Serializes and compresses/ uncompresses data with default compressor choices.

Public function

void

 

SerializeCompressedNew

(
    void* V,
    int64 Length,
    FName CompressionFormatToEncode,
    FName CompressionFormatToDecodeOldV...,
    ECompressionFlags Flags,
    bool bTreatBufferAsFileReader,
    int64* OutPartialReadLength
)

Serializes and compresses/ uncompresses data.

Public function Virtual

void

 

SerializeInt

(
    uint32& Value,
    uint32 Max
)

Public function Virtual

void

 

SerializeIntPacked

(
    uint32& Value
)

Packs int value into bytes of 7 bits with 8th bit for 'more'

Public function Virtual

void

 

SerializeIntPacked64

(
    uint64& Value
)

Packs int value into bytes of 7 bits with 8th bit for 'more'

Public function Virtual

bool

 

SetCompressionMap

(
    TArray< struct FCompressedChunk >&...,
    ECompressionFlags CompressionFlags
)

Sets mapping from offsets/ sizes that are going to be used for seeking and serialization to what is actually stored on disk.

Public function

void

 

StartSerializingDefaults()

Sets a flag indicating that this archive is currently serializing class/struct defaults.

Public function

void

 

StopSerializingDefaults()

Indicate that this archive is no longer serializing class/struct defaults.

Public function Virtual

void

 

UsingCustomVersion

(
    const FGuid& Guid
)

Registers the custom version to the archive.

Operators

Name Description

Public function Virtual

FArchive &

 

operator<<

(
    FObjectPtr& Value
)

Serializes a wrapped object pointer value from or into this archive.

Public function Virtual

FArchive &

 

operator<<

(
    UObject*& Value
)

Serializes an UObject value from or into this archive.

Public function Virtual

FArchive &

 

operator<<

(
    FField*& Value
)

Serializes a Field value from or into this archive.

Public function

FArchive &

 

operator<<

(
    TCheckedObjPtr< T >& Value
)

Serializes a UObject wrapped in a TCheckedObjPtr container, using the above operator, and verifies the serialized object is derived from the correct base class, to prevent illegal casting.

Public function Virtual

FArchive &

 

operator<<

(
    FLazyObjectPtr& Value
)

Serializes a lazy object pointer value from or into this archive.

Public function Virtual

FArchive &

 

operator<<

(
    FSoftObjectPtr& Value
)

Serializes asset pointer from or into this archive.

Public function Virtual

FArchive &

 

operator<<

(
    FText& Value
)

Serializes an FText value from or into an archive.

Public function Virtual

FArchive &

 

operator<<

(
    FWeakObjectPtr& Value
)

Serializes FWeakObjectPtr value from or into this archive.

Public function Virtual

FArchive &

 

operator<<

(
    FName& Value
)

Serializes an FName value from or into this archive.

Public function Virtual

FArchive &

 

operator<<

(
    FSoftObjectPath& Value
)

Serializes soft object paths from or into this archive.

Public function

FArchive &

 

operator=

(
    const FArchive& ArchiveToCopy
)

Classes

Name

Description

Public class

FScopeAddDebugData

Public class

FScopeSeekTo

Seeks to and restores the position of an archive.

Public class

FScopeSetDebugSerializationFlags

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Cancel