FArchive

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

Windows
MacOS
Linux

Inheritance Hierarchy

FArchiveState

FArchive

FArchiveFileReaderGeneric

FMovieSceneArchiveFileReader

FArchiveFileWriterGeneric

FMovieSceneArchiveFileWriter

FArchiveLoadCompressedProxy

FArchiveProxy

FArchiveFromStructuredArchiveImpl

FArchiveUObjectFromStructuredArchiveImpl

FChaosArchive

FMaterialResourceProxyReader

FNameAsStringIndexProxyArchive

FNameAsStringProxyArchive

FOodleNetworkArchiveBase

FOodleNetworkDictionaryArchive

FPacketCaptureArchive

FPropertyProxyArchive

FShaderSaveArchive

FArchiveSaveCompressedProxy

FArchiveUObject

FArchiveCountMem

FArchiveFindCulprit

FArchiveGenerateReferenceGraph

FArchiveHasReferences

FArchiveObjectCrc32

FArchiveObjectGraph

FArchiveObjectPropertyMapper

FArchiveReferenceMarker

FArchiveReplaceObjectRefBase

FArchiveReplaceObjectRef

FArchiveReplaceOrClearExternalReferences

FArchiveScriptReferenceCollector

FArchiveShowReferences

FArchiveTopLevelReferenceCollector

FArchiveTraceRoute

FDuplicateDataReader

FDuplicateDataWriter

FFindAssetsArchive

FFindReferencersArchive

FLinkerLoad

FLinkerSave

FReferenceCollectorArchive

FTransaction::FObjectRecord::FReader

FTransaction::FObjectRecord::FWriter

FAsyncWriter

FBitArchive

FBitReader

FNetBitReader

FInBunch

FBitWriter

FNetBitWriter

FOutBunch

FControlChannelOutBunch

FBufferReaderBase

FBufferReader

FBufferReaderWithSHA

FBulkDataReader

FBufferWriter

FBulkDataWriter

FHttpStreamFArchive

FLocalFileStreamFArchive

FMemoryArchive

FArrayReader

FLargeMemoryReader

FArchiveStackTraceReader

FLargeMemoryWriter

FArchiveStackTrace

FMemoryReader

F4MLMemoryReader

FConcertIdentifierReader

FConcertSyncObjectReader

FMemoryReaderView

FMemoryWriter

F4MLMemoryWriter

FBufferArchive

FNetworkFileArchive

FConcertIdentifierWriter

FConcertSyncObjectWriter

FMaterialResourceMemoryWriter

FObjectWriter

FObjectReader

FStaticMemoryReader

TMemoryHasher

FOutputDeviceMemory::FOutputDeviceMemoryProxyArchive

FPreloadableFile

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

(
    UObject* Owner,
    FUntypedBulkData* 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

(
    FUntypedBulkData* BulkData,
    bool bEnsureBulkDataIsLoaded
)

Detaches the passed in bulk data object from the linker.

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

FArchiveStat...

 

GetArchiveState()

Returns the low level archive state for this archive.

Public function Const

const FArchi...

 

GetArchiveState()

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 Virtual Const

bool

 

IsUsingEventDrivenLoader()

Returns whether the Event Driven Loader is enabled or not.

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 UObject* TypeObject,
    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

void

 

SerializeCompressed

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

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

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<<

(
    FField*& Value
)

Serializes a Field 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<<

(
    FText& Value
)

Serializes an FText value from or into an archive.

Public function Virtual

FArchive &

 

operator<<

(
    FName& Value
)

Serializes an FName value from or into this archive.

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

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<<

(
    FWeakObjectPtr& Value
)

Serializes FWeakObjectPtr 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

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