UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FArchive Class Reference

#include <Archive.h>

+ Inheritance diagram for FArchive:

Classes

class  FScopeSeekTo
 
class  FScopeSetDebugSerializationFlags
 

Public Member Functions

 FArchive ()=default
 
 FArchive (const FArchive &)=default
 
FArchiveoperator= (const FArchive &ArchiveToCopy)=default
 
virtual CORE_API ~FArchive ()
 
virtual FArchiveoperator<< (FName &Value)
 
virtual CORE_API FArchiveoperator<< (FText &Value)
 
virtual FArchiveoperator<< (UObject *&Value)
 
virtual FArchiveoperator<< (FField *&Value)
 
template<class T >
FArchiveoperator<< (TCheckedObjPtr< T > &Value)
 
virtual CORE_API FArchiveoperator<< (struct FLazyObjectPtr &Value)
 
virtual CORE_API FArchiveoperator<< (struct FObjectPtr &Value)
 
virtual CORE_API FArchiveoperator<< (struct FSoftObjectPtr &Value)
 
virtual CORE_API FArchiveoperator<< (struct FSoftObjectPath &Value)
 
virtual CORE_API FArchiveoperator<< (struct FWeakObjectPtr &Value)
 
virtual void ForceBlueprintFinalization ()
 
virtual void Serialize (void *V, int64 Length)
 
virtual void SerializeBits (void *V, int64 LengthBits)
 
virtual void SerializeInt (uint32 &Value, uint32 Max)
 
virtual CORE_API void SerializeIntPacked (uint32 &Value)
 
virtual CORE_API void SerializeIntPacked64 (uint64 &Value)
 
virtual void Preload (UObject *Object)
 
FArchiveStateGetArchiveState ()
 
const FArchiveStateGetArchiveState () const
 
virtual void Seek (int64 InPos)
 
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 FBulkDataSerializationParams &Params)
 
virtual bool IsProxyOf (FArchive *InOther) const
 
virtual bool Precache (int64 PrecacheOffset, int64 PrecacheSize)
 
virtual void FlushCache ()
 
virtual bool SetCompressionMap (TArray< FCompressedChunk > *CompressedChunks, ECompressionFlags CompressionFlags)
 
virtual void Flush ()
 
virtual bool Close ()
 
CORE_API void SerializeCompressed (void *V, int64 Length, FName CompressionFormatCannotChange, ECompressionFlags Flags=COMPRESS_NoFlags, bool bTreatBufferAsFileReader=false)
 
CORE_API void SerializeCompressedNew (void *V, int64 Length, FName CompressionFormatToEncode, FName CompressionFormatToDecodeOldV1Files, ECompressionFlags Flags=COMPRESS_NoFlags, bool bTreatBufferAsFileReader=false, int64 *OutPartialReadLength=nullptr)
 
CORE_API void SerializeCompressedNew (void *V, int64 Length)
 
CORE_API void ByteSwap (void *V, int32 Length)
 
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 TObjectPtr< const UObject > &TypeObject, const FName &ValueName) const
 
template<typename FmtType , typename... Types>
void Logf (const FmtType &Fmt, Types... Args)
 
virtual CORE_API void UsingCustomVersion (const struct FGuid &Guid)
 
virtual FArchiveGetCacheableArchive ()
 
void SetCookData (FArchiveCookData *InCookData)
 
FArchiveCookDataGetCookData ()
 
virtual CORE_API void PushSerializedProperty (class FProperty *InProperty, const bool bIsEditorOnlyProperty)
 
virtual CORE_API void PopSerializedProperty (class FProperty *InProperty, const bool bIsEditorOnlyProperty)
 
virtual bool AttachExternalReadDependency (FExternalReadCallback &ReadCallback)
 
template<SIZE_T Size>
bool FastPathLoad (void *InDest)
 
virtual void PushFileRegionType (EFileRegionType Type)
 
virtual void PopFileRegionType ()
 
CORE_API void SetArchiveState (const FArchiveState &InState)
 
CORE_API void SetError ()
 
CORE_API void ClearError ()
 
CORE_API void SetCriticalError ()
 
virtual FArchiveStateGetInnermostState ()
 
virtual void CountBytes (SIZE_T InNum, SIZE_T InMax)
 
virtual CORE_API FString GetArchiveName () const
 
virtual FLinkerGetLinker ()
 
virtual int64 Tell ()
 
virtual int64 TotalSize ()
 
virtual bool AtEnd ()
 
bool IsByteSwapping ()
 
void ThisContainsCode ()
 
void ThisContainsMap ()
 
CORE_API void ThisRequiresLocalizationGather ()
 
virtual UObjectGetArchetypeFromLoader (const UObject *Obj)
 
UE_FORCEINLINE_HINT FPackageFileVersion UEVer () const
 
UE_FORCEINLINE_HINT int32 LicenseeUEVer () const
 
UE_FORCEINLINE_HINT FEngineVersionBase EngineVer () const
 
virtual CORE_API uint32 EngineNetVer () const
 
virtual CORE_API uint32 GameNetVer () const
 
CORE_API int32 CustomVer (const struct FGuid &Key) const
 
UE_FORCEINLINE_HINT bool IsLoading () const
 
UE_FORCEINLINE_HINT bool IsLoadingFromCookedPackage () const
 
UE_FORCEINLINE_HINT bool IsSaving () const
 
bool IsTransacting () const
 
UE_FORCEINLINE_HINT bool IsTextFormat () const
 
UE_FORCEINLINE_HINT bool WantBinaryPropertySerialization () const
 
UE_FORCEINLINE_HINT bool UseUnversionedPropertySerialization () const
 
UE_FORCEINLINE_HINT bool IsForcingUnicode () const
 
UE_FORCEINLINE_HINT bool IsPersistent () const
 
UE_FORCEINLINE_HINT bool GetError () const
 
UE_FORCEINLINE_HINT bool IsError () const
 
UE_FORCEINLINE_HINT bool IsCriticalError () const
 
UE_FORCEINLINE_HINT bool ContainsCode () const
 
UE_FORCEINLINE_HINT bool ContainsMap () const
 
bool RequiresLocalizationGather () const
 
UE_FORCEINLINE_HINT bool ForceByteSwapping () const
 
UE_FORCEINLINE_HINT bool IsSerializingDefaults () const
 
UE_FORCEINLINE_HINT bool IsIgnoringArchetypeRef () const
 
UE_FORCEINLINE_HINT bool DoDelta () const
 
UE_FORCEINLINE_HINT bool DoIntraPropertyDelta () const
 
UE_FORCEINLINE_HINT bool IsIgnoringOuterRef () const
 
UE_FORCEINLINE_HINT bool IsIgnoringClassGeneratedByRef () const
 
UE_FORCEINLINE_HINT bool IsIgnoringClassRef () const
 
UE_FORCEINLINE_HINT bool IsAllowingLazyLoading () const
 
UE_FORCEINLINE_HINT bool IsObjectReferenceCollector () const
 
UE_FORCEINLINE_HINT bool IsModifyingWeakAndStrongReferences () const
 
UE_FORCEINLINE_HINT bool IsCountingMemory () const
 
UE_FORCEINLINE_HINT uint32 GetPortFlags () const
 
UE_FORCEINLINE_HINT bool HasAnyPortFlags (uint32 Flags) const
 
UE_FORCEINLINE_HINT bool HasAllPortFlags (uint32 Flags) const
 
uint32 GetDebugSerializationFlags () const
 
UE_FORCEINLINE_HINT bool ShouldSkipBulkData () const
 
UE_FORCEINLINE_HINT int64 GetMaxSerializeSize () const
 
virtual CORE_API const FCustomVersionContainerGetCustomVersions () const
 
virtual CORE_API void SetCustomVersions (const FCustomVersionContainer &CustomVersionContainer)
 
virtual CORE_API void ResetCustomVersions ()
 
CORE_API void SetCustomVersion (const struct FGuid &Key, int32 Version, FName FriendlyName)
 
void SetByteSwapping (bool Enabled)
 
void SetPortFlags (uint32 InPortFlags)
 
virtual void SetDebugSerializationFlags (uint32 InCustomFlags)
 
bool IsFilterEditorOnly () const
 
virtual void SetFilterEditorOnly (bool InFilterEditorOnly)
 
bool IsSavingOptionalObject () const
 
virtual void SetSavingOptionalObject (bool InSavingOptionalObject)
 
bool IsSaveGame () const
 
UE_FORCEINLINE_HINT bool IsNetArchive () const
 
UE_FORCEINLINE_HINT bool IsCooking () const
 
UE_FORCEINLINE_HINT const ITargetPlatformCookingTarget () const
 
void SetSavePackageData (FArchiveSavePackageData *InSavePackageData)
 
FArchiveSavePackageDataGetSavePackageData ()
 
UE_FORCEINLINE_HINT FArchiveCookContextGetCookContext ()
 
virtual bool UseToResolveEnumerators () const
 
virtual bool ShouldSkipProperty (const FProperty *InProperty) const
 
virtual void SetSerializedProperty (FProperty *InProperty)
 
UE_FORCEINLINE_HINT class FPropertyGetSerializedProperty () const
 
CORE_API void GetSerializedPropertyChain (TArray< class FProperty * > &OutProperties) const
 
UE_FORCEINLINE_HINT const FArchiveSerializedPropertyChainGetSerializedPropertyChain () const
 
virtual CORE_API void SetSerializedPropertyChain (const FArchiveSerializedPropertyChain *InSerializedPropertyChain, class FProperty *InSerializedPropertyOverride=nullptr)
 
virtual void SetSerializeContext (FUObjectSerializeContext *InLoadContext)
 
virtual CORE_API void Reset ()
 
virtual CORE_API void SetIsLoading (bool bInIsLoading)
 
virtual CORE_API void SetIsLoadingFromCookedPackage (bool bInIsLoadingFromCookedPackage)
 
virtual CORE_API void SetIsSaving (bool bInIsSaving)
 
virtual CORE_API void SetIsTransacting (bool bInIsTransacting)
 
virtual CORE_API void SetIsTextFormat (bool bInIsTextFormat)
 
virtual CORE_API void SetWantBinaryPropertySerialization (bool bInWantBinaryPropertySerialization)
 
virtual CORE_API void SetUseUnversionedPropertySerialization (bool bInUseUnversioned)
 
virtual CORE_API void SetForceUnicode (bool bInForceUnicode)
 
virtual CORE_API void SetIsPersistent (bool bInIsPersistent)
 
virtual CORE_API void SetUEVer (FPackageFileVersion InVer)
 
virtual CORE_API void SetLicenseeUEVer (int32 InVer)
 
virtual CORE_API void SetEngineVer (const FEngineVersionBase &InVer)
 
virtual CORE_API void SetEngineNetVer (const uint32 InEngineNetVer)
 
virtual CORE_API void SetGameNetVer (const uint32 InGameNetVer)
 
UE_FORCEINLINE_HINT bool ShouldSkipCompilingAssets () const
 
CORE_API void SetShouldSkipUpdateCustomVersion (bool bShouldSkip)
 
UE_FORCEINLINE_HINT bool ShouldSkipUpdateCustomVersion () const
 
CORE_API void SetMigratingRemoteObjects (bool bMigrating)
 
UE_FORCEINLINE_HINT constexpr bool IsMigratingRemoteObjects () const
 
virtual const FUObjectMigrationContextGetMigrationContext () const
 

Public Attributes

FFastPathLoadBufferActiveFPLB
 
FFastPathLoadBuffer InlineFPLB
 
uint8 ArContainsCode: 1
 
uint8 ArContainsMap: 1
 
UE_DEPRECATED(5.6, "Public access to ArRequiresLocalizationGather has been deprecated - please use Ar.RequiresLocalizationGather() and Ar.ThisRequiresLocalizationGather() for getting and setting respectively.") uint8 ArRequiresLocalizationGather 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 ArIsSavingOptionalObject: 1
 
uint8 ArIsSaveGame: 1
 
uint8 ArIsNetArchive: 1
 
uint8 ArUseCustomPropertyList: 1
 
int32 ArSerializingDefaults
 
uint32 ArPortFlags
 
int64 ArMaxSerializeSize
 
uint8 ArMergeOverrides: 1
 
uint8 ArPreserveArrayElements: 1
 
const struct FCustomPropertyListNodeArCustomPropertyList
 

Protected Member Functions

void SetShouldSkipCompilingAssets (bool Enabled)
 

Static Protected Member Functions

static CORE_API void LinkProxy (FArchiveState &Inner, FArchiveState &Proxy)
 
static CORE_API void UnlinkProxy (FArchiveState &Inner, FArchiveState &Proxy)
 

Friends

FArchiveoperator<< (FArchive &Ar, ANSICHAR &Value)
 
FArchiveoperator<< (FArchive &Ar, WIDECHAR &Value)
 
FArchiveoperator<< (FArchive &Ar, UTF32CHAR &Value)
 
FArchiveoperator<< (FArchive &Ar, uint8 &Value)
 
FArchiveoperator<< (FArchive &Ar, int8 &Value)
 
FArchiveoperator<< (FArchive &Ar, uint16 &Value)
 
FArchiveoperator<< (FArchive &Ar, int16 &Value)
 
FArchiveoperator<< (FArchive &Ar, uint32 &Value)
 
FArchiveoperator<< (FArchive &Ar, bool &D)
 
FArchiveoperator<< (FArchive &Ar, int32 &Value)
 
FArchiveoperator<< (FArchive &Ar, float &Value)
 
FArchiveoperator<< (FArchive &Ar, double &Value)
 
FArchiveoperator<< (FArchive &Ar, uint64 &Value)
 
FArchiveoperator<< (FArchive &Ar, int64 &Value)
 
CORE_API FArchiveoperator<< (FArchive &Ar, FString &Value)
 

Detailed Description

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

Constructor & Destructor Documentation

◆ FArchive() [1/2]

FArchive::FArchive ( )
default

◆ FArchive() [2/2]

FArchive::FArchive ( const FArchive )
default

◆ ~FArchive()

FArchive::~FArchive ( )
virtualdefault

Member Function Documentation

◆ AtEnd()

virtual bool FArchiveState::AtEnd ( )
inlinevirtual

Returns true if the current location within the backing data storage is at the end, always returns false if there is no storage.

Reimplemented from FArchiveState.

Reimplemented in FBitReader, FBufferWriter, FBulkDataWriter, FHttpStreamFArchive, FInMemoryReplayStreamArchive, FBufferReaderBase, FArchiveProxy, and FLocalFileStreamFArchive.

◆ AttachBulkData() [1/2]

virtual void FArchive::AttachBulkData ( UE::Serialization::FEditorBulkData BulkData)
inlinevirtual

◆ AttachBulkData() [2/2]

virtual void FArchive::AttachBulkData ( UObject Owner,
FBulkData BulkData 
)
inlinevirtual

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

Parameters
OwnerUObject owning the bulk data
BulkDataBulk data object to associate

Reimplemented in FArchiveProxy.

◆ AttachExternalReadDependency()

virtual bool FArchive::AttachExternalReadDependency ( FExternalReadCallback ReadCallback)
inlinevirtual

Adds external read dependency

Returns
true if dependency has been added, false if Archive does not support them

Reimplemented in FArchiveProxy, FExportArchive, FLinkerLoad, and FShaderPipelineCacheArchive.

◆ ByteOrderSerialize()

FArchive & FArchive::ByteOrderSerialize ( void V,
int32  Length 
)
inline

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

◆ ByteSwap()

void FArchive::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.

◆ ClearError()

void FArchiveState::ClearError ( )

Sets ArIsError to false, this does not clear any CriticalErrors

◆ Close()

virtual bool FArchive::Close ( )
inlinevirtual

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

Reimplemented in FBufferWriter, FPreloadableArchive, FPreloadableArchiveProxy, FBufferReaderWithSHA, FArchiveProxy, FBufferReaderBase, FAsyncArchive, FNonBufferingReadOnlyArchive, FArchiveFileReaderGeneric, and FArchiveFileWriterGeneric.

◆ ContainsCode()

UE_FORCEINLINE_HINT bool FArchiveState::ContainsCode ( ) const
inline

Returns true if this archive contains native or generated code.

◆ ContainsMap()

UE_FORCEINLINE_HINT bool FArchiveState::ContainsMap ( ) const
inline

Returns true if this archive contains a ULevel or UWorld object.

◆ CookingTarget()

UE_FORCEINLINE_HINT const ITargetPlatform * FArchiveState::CookingTarget ( ) const
inline

Returns the cooking target platform. Returns null if not being serialized from Savepackage, or if it is an editor save rather than a cook save.

Returns
Target platform.

◆ CountBytes()

virtual void FArchiveState::CountBytes ( SIZE_T  InNum,
SIZE_T  InMax 
)
inlinevirtual

Called to get the computed size from a size-detecting archive after it has finished serializing.

Reimplemented from FArchiveState.

Reimplemented in FArchiveCountConfigMem, FArchiveCountMemGUID, FArchiveCountStructMem, FArchiveProxy, and FArchiveCountMem.

◆ CustomVer()

int32 FArchiveState::CustomVer ( const struct FGuid Key) const

Queries a custom version from the archive. If the archive is being used to write, the custom version must have already been registered.

Parameters
KeyThe guid of the custom version to query.
Returns
The version number, or -1 if the custom tag isn't stored in the archive.

◆ DetachBulkData() [1/2]

virtual void FArchive::DetachBulkData ( FBulkData BulkData,
bool  bEnsureBulkDataIsLoaded 
)
inlinevirtual

Detaches the passed in bulk data object from the linker.

Parameters
BulkDataBulk data object to detach
bEnsureBulkDataIsLoadedWhether to ensure that the bulk data is loaded before detaching

Reimplemented in FArchiveProxy.

◆ DetachBulkData() [2/2]

virtual void FArchive::DetachBulkData ( UE::Serialization::FEditorBulkData BulkData,
bool  bEnsureBulkDataIsLoaded 
)
inlinevirtual

◆ DoDelta()

UE_FORCEINLINE_HINT bool FArchiveState::DoDelta ( ) const
inline

Returns true if this archive should handle delta serialization for properties.

◆ DoIntraPropertyDelta()

UE_FORCEINLINE_HINT bool FArchiveState::DoIntraPropertyDelta ( ) const
inline

Returns true if this archive should perform delta serialization within properties (e.g. TMaps and TSets).

◆ EngineNetVer()

uint32 FArchiveState::EngineNetVer ( ) const
virtual

Returns the engine-global network protocol version for this archive.

Reimplemented from FArchiveState.

Reimplemented in FInBunch.

◆ EngineVer()

UE_FORCEINLINE_HINT FEngineVersionBase FArchiveState::EngineVer ( ) const
inline

Returns the compiled engine version used for this archive.

◆ FastPathLoad()

template<SIZE_T Size>
bool FArchive::FastPathLoad ( void InDest)
inline

◆ Flush()

virtual void FArchive::Flush ( )
inlinevirtual

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

Reimplemented in FAsyncWriter, FArchiveSaveCompressedProxy, FArchiveProxy, FTransactionallySafeArchiveWriter, and FArchiveFileWriterGeneric.

◆ FlushCache()

virtual void FArchive::FlushCache ( )
inlinevirtual

Flushes cache and frees internal data.

Reimplemented in FArchiveProxy, FAsyncArchive, FLinkerLoad, and FArchiveFileReaderGeneric.

◆ ForceBlueprintFinalization()

virtual void FArchive::ForceBlueprintFinalization ( )
inlinevirtual

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.

Reimplemented in FArchiveProxy, and FLinkerLoad.

◆ ForceByteSwapping()

UE_FORCEINLINE_HINT bool FArchiveState::ForceByteSwapping ( ) const
inline

Returns true if this archive should always swap bytes, ignoring endian rules.

◆ GameNetVer()

uint32 FArchiveState::GameNetVer ( ) const
virtual

Returns the game-specific network protocol version for this archive.

Reimplemented from FArchiveState.

Reimplemented in FInBunch.

◆ GetArchetypeFromLoader()

virtual UObject * FArchiveState::GetArchetypeFromLoader ( const UObject Obj)
inlinevirtual

Called to retrieve the archetype from the event driven loader. If this returns null, then call GetArchetype yourself.

Reimplemented from FArchiveState.

Reimplemented in FExportArchive, FArchiveProxy, UE::RemoteObject::Serialization::FArchiveRemoteObjectWriter, FLinkerLoad, and FCPFUOWriter.

◆ GetArchiveName()

FString FArchiveState::GetArchiveName ( ) const
virtual

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

Reimplemented in FArchiveMD5, FBufferReaderWithSHA, FArrayReader, TBufferArchive< IndexSize >, TBufferArchive< 32 >, TBufferArchive< 64 >, FBufferReaderBase, FBufferReader, FBufferWriter, FMemoryArchive, FArchiveDescribeReference, FArchiveFindAllRefs, FArchiveCrc32, FArchiveFindCulprit, FArchiveObjectCrc32, FArchiveReplaceObjectRefBase, FArchiveShowReferences, FBulkDataReader, FBulkDataWriter, FDuplicateDataReader, FDuplicateDataWriter, FFindReferencersArchive, FPreloadableArchive, FPreloadableArchiveProxy, FPackageReader, FNonBufferingReadOnlyArchive, FArchiveFileWriterDummy, FArchiveFileReaderGeneric, FArchiveFileWriterGeneric, FArchiveProxy, FLargeMemoryReader, FLargeMemoryWriter, TMemoryHasher< HashBuilder, HashDigest >, FMemoryReader, FMemoryReaderView, TMemoryWriterBase< ArrayAllocatorType >, FStaticMemoryReader, FTransactionallySafeArchiveWriter, FExportArchive, FAsyncArchive, UE::StructUtils::FHashBuilder, UE::StructUtils::FArchiveCityHash64, PackageReloadInternal::FReplaceObjectReferencesArchive, UE::RemoteObject::Serialization::TArchiveRemoteObjectBase< FMemoryReader >, UE::RemoteObject::Serialization::TArchiveRemoteObjectBase< FMemoryWriter >, FPackageHarvester, FArchiveCountMem, FObjectReader, FObjectWriter, FLinkerLoad, FLinkerSave, FMaterialResourceMemoryWriter, FMaterialResourceProxyReader, UE::JsonUtilities::FArchiveMD5Generator, FEventParameterWriter, FEventParameterReader, FManifestWriter, and FManifestReader.

◆ GetArchiveState() [1/2]

FArchiveState & FArchive::GetArchiveState ( )
inline

Returns the low level archive state for this archive.

◆ GetArchiveState() [2/2]

const FArchiveState & FArchive::GetArchiveState ( ) const
inline

◆ GetCacheableArchive()

virtual FArchive * FArchive::GetCacheableArchive ( )
inlinevirtual

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. If the archive is actually a temporary proxy to another archive, and has a shorter lifecycle than the source archive, it should return either a pointer to the underlying archive, or if the data becomes inaccessible when the proxy object disappears (as is the case with text format archives) then nullptr

Reimplemented in FExportArchive, and FArchiveProxy.

◆ GetCookContext()

UE_FORCEINLINE_HINT FArchiveCookContext * FArchiveState::GetCookContext ( )
inline

◆ GetCookData()

FArchiveCookData * FArchive::GetCookData ( )
inline

◆ GetCustomVersions()

const FCustomVersionContainer & FArchiveState::GetCustomVersions ( ) const
virtual

Gets the custom version numbers for this archive. These are used to check for system or game-specific version numbers.

Returns
The container of custom versions in the archive.

Reimplemented from FArchiveState.

Reimplemented in FNameTableArchiveReader, FArchiveProxy, and FMaterialResourceMemoryWriter.

◆ GetDebugSerializationFlags()

uint32 FArchiveState::GetDebugSerializationFlags ( ) const
inline

Returns the editor-only debug serialization flags.

◆ GetError()

UE_FORCEINLINE_HINT bool FArchiveState::GetError ( ) const
inline

◆ GetInnermostState()

virtual FArchiveState & FArchiveState::GetInnermostState ( )
inlinevirtual

Returns lowest level archive state, proxy archives will override this.

Reimplemented from FArchiveState.

Reimplemented in FArchiveProxy.

◆ GetLinker()

virtual FLinker * FArchiveState::GetLinker ( )
inlinevirtual

If this archive is a FLinkerLoad or FLinkerSave, returns a pointer to the ULinker portion.

Returns
The linker, or nullptr if the archive is not a linker.

Reimplemented from FArchiveState.

Reimplemented in FLinkerSave, FArchiveProxy, and FLinkerLoad.

◆ GetMaxSerializeSize()

UE_FORCEINLINE_HINT int64 FArchiveState::GetMaxSerializeSize ( ) const
inline

Returns the maximum size of data that this archive is allowed to serialize.

◆ GetMigrationContext()

virtual const FUObjectMigrationContext * FArchiveState::GetMigrationContext ( ) const
inlinevirtual

When migrating objects, we may need some context as to the intent of the migration during serialization

Reimplemented from FArchiveState.

Reimplemented in UE::RemoteObject::Serialization::TArchiveRemoteObjectBase< FMemoryReader >, and UE::RemoteObject::Serialization::TArchiveRemoteObjectBase< FMemoryWriter >.

◆ GetPortFlags()

UE_FORCEINLINE_HINT uint32 FArchiveState::GetPortFlags ( ) const
inline

Returns this archive's property serialization modifier flags.

◆ GetSavePackageData()

FArchiveSavePackageData * FArchiveState::GetSavePackageData ( )
inline

◆ GetSerializedProperty()

UE_FORCEINLINE_HINT class FProperty * FArchiveState::GetSerializedProperty ( ) const
inline

Gets the property that is currently being serialized

Returns
Pointer to the property that is currently being serialized

◆ GetSerializedPropertyChain() [1/2]

UE_FORCEINLINE_HINT const FArchiveSerializedPropertyChain * FArchiveState::GetSerializedPropertyChain ( ) const
inline

Get the raw serialized property chain for this archive

Note
Accessing this directly can avoid an array allocation depending on your use-case

◆ GetSerializedPropertyChain() [2/2]

void FArchiveState::GetSerializedPropertyChain ( TArray< class FProperty * > &  OutProperties) const

Gets the chain of properties that are currently being serialized

Note
This populates the array in stack order, so the 0th entry in the array is the top of the stack of properties

◆ HasAllPortFlags()

UE_FORCEINLINE_HINT bool FArchiveState::HasAllPortFlags ( uint32  Flags) const
inline

Checks to see if all of the passed in property serialization modifier flags are set.

◆ HasAnyPortFlags()

UE_FORCEINLINE_HINT bool FArchiveState::HasAnyPortFlags ( uint32  Flags) const
inline

Checks to see if any of the passed in property serialization modifier flags are set.

◆ IsAllowingLazyLoading()

UE_FORCEINLINE_HINT bool FArchiveState::IsAllowingLazyLoading ( ) const
inline

Returns true if this archive sould allow lazy loading of bulk / secondary data.

◆ IsByteSwapping()

bool FArchiveState::IsByteSwapping ( )
inline

Returns true if data larger than 1 byte should be swapped to deal with endian mismatches.

◆ IsCooking()

UE_FORCEINLINE_HINT bool FArchiveState::IsCooking ( ) const
inline

Checks whether the archive is used for cooking.

Returns
true if the archive is used for cooking, false otherwise.

◆ IsCountingMemory()

UE_FORCEINLINE_HINT bool FArchiveState::IsCountingMemory ( ) const
inline

Returns true if this archive is counting memory, normally CountBytes is called to get the size.

◆ IsCriticalError()

UE_FORCEINLINE_HINT bool FArchiveState::IsCriticalError ( ) const
inline

Returns true if this archive contains critical errors that cannot be recovered from.

◆ IsError()

UE_FORCEINLINE_HINT bool FArchiveState::IsError ( ) const
inline

Returns true if this archive contains errors, which means that further serialization is generally not safe.

◆ IsFilterEditorOnly()

bool FArchiveState::IsFilterEditorOnly ( ) const
inline

Indicates whether this archive is filtering editor-only on save or contains data that had editor-only content stripped.

Returns
true if the archive filters editor-only content, false otherwise.

◆ IsForcingUnicode()

UE_FORCEINLINE_HINT bool FArchiveState::IsForcingUnicode ( ) const
inline

Returns true if this archive wants to always save strings in UTF16 format even if they are ANSI characters.

◆ IsIgnoringArchetypeRef()

UE_FORCEINLINE_HINT bool FArchiveState::IsIgnoringArchetypeRef ( ) const
inline

Returns true if this archive should ignore archetype references for structs and classes.

◆ IsIgnoringClassGeneratedByRef()

UE_FORCEINLINE_HINT bool FArchiveState::IsIgnoringClassGeneratedByRef ( ) const
inline

Returns true if this archive should ignore the ClassGeneratedBy reference in UClass.

◆ IsIgnoringClassRef()

UE_FORCEINLINE_HINT bool FArchiveState::IsIgnoringClassRef ( ) const
inline

Returns true if this archive should ignore the Class reference in UObject.

◆ IsIgnoringOuterRef()

UE_FORCEINLINE_HINT bool FArchiveState::IsIgnoringOuterRef ( ) const
inline

Returns true if this archive should ignore the Outer reference in UObject.

◆ IsLoading()

UE_FORCEINLINE_HINT bool FArchiveState::IsLoading ( ) const
inline

Returns true if this archive is for loading data.

◆ IsLoadingFromCookedPackage()

UE_FORCEINLINE_HINT bool FArchiveState::IsLoadingFromCookedPackage ( ) const
inline

Returns true if this archive is loading from a cooked package.

◆ IsMigratingRemoteObjects()

UE_FORCEINLINE_HINT constexpr bool FArchiveState::IsMigratingRemoteObjects ( ) const
inlineconstexpr

Returns true if this Archive is migrating remote object

◆ IsModifyingWeakAndStrongReferences()

UE_FORCEINLINE_HINT bool FArchiveState::IsModifyingWeakAndStrongReferences ( ) const
inline

Returns true if this archive should modify/search weak object references as well as strong ones.

◆ IsNetArchive()

UE_FORCEINLINE_HINT bool FArchiveState::IsNetArchive ( ) const
inline

Whether or not this archive is serializing data being sent/received by the netcode

◆ IsObjectReferenceCollector()

UE_FORCEINLINE_HINT bool FArchiveState::IsObjectReferenceCollector ( ) const
inline

Returns true if this archive is only looking for UObject references. This can be false for reference collectors looking for more general references.

◆ IsPersistent()

UE_FORCEINLINE_HINT bool FArchiveState::IsPersistent ( ) const
inline

Returns true if this archive is saving or loading data destined for persistent storage and should skip transient data. This is also true for some intermediate archives for tasks like duplication that are eventually destined for persistent storage.

◆ IsProxyOf()

virtual bool FArchive::IsProxyOf ( FArchive InOther) const
inlinevirtual

Determine if the given archive is a valid "child" of this archive. In general, this means "is exactly the same" but this function allows a derived archive to support "child" or "internal" archives which are different objects that proxy the original one in some way.

Parameters
BulkDataBulk data object to detach
bEnsureBulkDataIsLoadedWhether to ensure that the bulk data is loaded before detaching

Reimplemented in FArchiveProxy.

◆ IsSaveGame()

bool FArchiveState::IsSaveGame ( ) const
inline

Indicates whether this archive is saving or loading game state

Note
This is intended for game-specific archives and is not true for any of the build in save methods
Returns
true if the archive is dealing with save games, false otherwise.

◆ IsSaving()

UE_FORCEINLINE_HINT bool FArchiveState::IsSaving ( ) const
inline

Returns true if this archive is for saving data, this can also be a pre-save preparation archive.

◆ IsSavingOptionalObject()

bool FArchiveState::IsSavingOptionalObject ( ) const
inline

Indicates when the archive is serializing an Optional object. Will only return true when Ar.IsSaving() is also true

See also
EClassFlags::CLASS_Optional
Returns
true if currently saving optional data

◆ IsSerializingDefaults()

UE_FORCEINLINE_HINT bool FArchiveState::IsSerializingDefaults ( ) const
inline

Returns true if this archive is currently serializing class/struct default values.

◆ IsTextFormat()

UE_FORCEINLINE_HINT bool FArchiveState::IsTextFormat ( ) const
inline

Returns true if this archive serializes to a structured text format. Text format archives should use high level constructs from FStructuredArchive for delimiting data rather than manually seeking through the file.

◆ IsTransacting()

bool FArchiveState::IsTransacting ( ) const
inline

Returns true if this archive is transacting, which is used to keep track of changes to objects for things like the editor undo system.

◆ LicenseeUEVer()

UE_FORCEINLINE_HINT int32 FArchiveState::LicenseeUEVer ( ) const
inline

Returns the licensee-specific version used for this archive, will be 0 by default.

◆ LinkProxy()

void FArchiveState::LinkProxy ( FArchiveState Inner,
FArchiveState Proxy 
)
staticprotected

◆ Logf()

template<typename FmtType , typename... Types>
void FArchive::Logf ( const FmtType Fmt,
Types...  Args 
)
inline

◆ MarkScriptSerializationEnd()

virtual void FArchive::MarkScriptSerializationEnd ( const UObject Obj)
inlinevirtual

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

Reimplemented in FArchiveProxy, FLinkerLoad, FLinkerSave, UE::Transaction::FDiffableObjectDataWriter, FCPFUOWriter, and FCPFUOReader.

◆ MarkScriptSerializationStart()

virtual void FArchive::MarkScriptSerializationStart ( const UObject Obj)
inlinevirtual

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

Reimplemented in FArchiveProxy, FLinkerLoad, FLinkerSave, UE::Transaction::FDiffableObjectDataWriter, FCPFUOWriter, and FCPFUOReader.

◆ MarkSearchableName()

virtual void FArchive::MarkSearchableName ( const TObjectPtr< const UObject > &  TypeObject,
const FName ValueName 
) const
inlinevirtual

Called to register a reference to a specific name value, of type TypeObject (UEnum or UStruct normally). Const so it can be called from PostSerialize

Reimplemented in FArchiveProxy, and FPackageHarvester.

◆ operator<<() [1/10]

virtual FArchive & FArchive::operator<< ( FField *&  Value)
inlinevirtual

Serializes a Field value from or into this archive.

This operator can be implemented by sub-classes that wish to serialize UObject instances.

Parameters
ValueThe value to serialize.
Returns
This instance.

Reimplemented in FArchiveScriptReferenceCollector, FArchiveReplaceObjectAndStructPropertyRef< T >, FArchiveMD5, FMemoryArchive, FExportArchive, FArchiveUObject, FBulkDataReader, FBulkDataWriter, FLinkerSave, UE::Transaction::FSerializedObjectDataReader, UE::Transaction::FSerializedObjectDataWriter, UE::Transaction::FDiffableObjectDataWriter, FArchiveProxy, and FPropertyProxyArchive.

◆ operator<<() [2/10]

virtual FArchive & FArchive::operator<< ( FName Value)
inlinevirtual

◆ operator<<() [3/10]

FArchive & FArchive::operator<< ( FText Value)
virtual

◆ operator<<() [4/10]

◆ operator<<() [5/10]

FArchive & FArchive::operator<< ( struct FObjectPtr Value)
virtual

◆ operator<<() [6/10]

◆ operator<<() [7/10]

◆ operator<<() [8/10]

◆ operator<<() [9/10]

template<class T >
FArchive & FArchive::operator<< ( TCheckedObjPtr< T > &  Value)
inline

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.

Parameters
ValueThe value to serialize.
Returns
This instance.

◆ operator<<() [10/10]

virtual FArchive & FArchive::operator<< ( UObject *&  Value)
inlinevirtual

Serializes an UObject value from or into this archive.

This operator can be implemented by sub-classes that wish to serialize UObject instances.

Parameters
ValueThe value to serialize.
Returns
This instance.

Reimplemented in FArchiveCrc32, FArchiveObjectCrc32, UE::StructUtils::FArchiveCityHash64, FMemoryArchive, UE::Transaction::FSerializedObjectDataReader, UE::Transaction::FSerializedObjectDataWriter, UE::Transaction::FDiffableObjectDataWriter, FArchiveMD5, FArchiveReplaceOrClearExternalReferences< T >, FArchiveReplaceOrClearExternalReferences< UObject >, FAggressiveReplacementAuditArchive, FTextReferencesArchive, UE::RemoteObject::Serialization::FArchiveRemoteObjectWriter, UE::RemoteObject::Serialization::FArchiveRemoteObjectReader, FPackageHarvester, FArchiveReplaceObjectRef< T >, FArchiveReplaceObjectRef< UObject >, FObjectAndNameAsStringProxyArchive, FLinkerSave, FArchiveGatherExternalActorRefs, FArchiveReplaceOrClearGarbageReferences< T >, FObjectAsTraceIdProxyArchive, UE::MovieSceneTracks::FArchiveClearExternalReferences, FArchiveReferenceMarker, FEditorContentReferencersArchive, FControlChannelOutBunch, FExportArchive, UE::StructUtils::FHashBuilder, FPropertyTrackingReferenceCollectorArchive, FArchiveScriptReferenceCollector, FNetBitWriter, FNetBitReader, FReferenceCollectorArchive, FDataCachePropertyWriter, FDataCachePropertyReader, FPIEFixupSerializer, PackageReloadInternal::FReplaceObjectReferencesArchive, FObjectReader, FObjectWriter, FEventParameterArchive, FArchiveMD5, FMemoryArchive, FExportArchive, FArchiveUObject, FBulkDataReader, FBulkDataWriter, FLinkerSave, UE::Transaction::FSerializedObjectDataReader, UE::Transaction::FSerializedObjectDataWriter, UE::Transaction::FDiffableObjectDataWriter, FArchiveProxy, and FObjectReaderWithReplacement.

◆ operator=()

FArchive & FArchive::operator= ( const FArchive ArchiveToCopy)
default

◆ PopFileRegionType()

virtual void FArchive::PopFileRegionType ( )
inlinevirtual

◆ PopSerializedProperty()

void FArchive::PopSerializedProperty ( class FProperty InProperty,
const bool  bIsEditorOnlyProperty 
)
virtual

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

Parameters
InPropertyPointer to the property that was previously being serialized
bIsEditorOnlyPropertyTrue if the property is editor only (call FProperty::IsEditorOnlyProperty to work this out, as the archive can't since it can't access CoreUObject types)

Reimplemented in FArchiveProxy, and FLinkerSave.

◆ Precache()

virtual bool FArchive::Precache ( int64  PrecacheOffset,
int64  PrecacheSize 
)
inlinevirtual

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 in FPackageReader, FNameTableArchiveReader, FNonBufferingReadOnlyArchive, FArchiveFileReaderGeneric, FArchiveProxy, and FAsyncArchive.

◆ Preload()

virtual void FArchive::Preload ( UObject Object)
inlinevirtual

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

Reimplemented in FArchiveProxy, and FLinkerLoad.

◆ PushFileRegionType()

virtual void FArchive::PushFileRegionType ( EFileRegionType  Type)
inlinevirtual

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

◆ PushSerializedProperty()

void FArchive::PushSerializedProperty ( class FProperty InProperty,
const bool  bIsEditorOnlyProperty 
)
virtual

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

Parameters
InPropertyPointer to the property that is currently being serialized
bIsEditorOnlyPropertyTrue if the property is editor only (call FProperty::IsEditorOnlyProperty to work this out, as the archive can't since it can't access CoreUObject types)

Reimplemented in FArchiveProxy, and FLinkerSave.

◆ RequiresLocalizationGather()

bool FArchiveState::RequiresLocalizationGather ( ) const
inline

Returns true if this archive contains data required to be gathered for localization.

◆ Reset()

void FArchiveState::Reset ( void  )
virtual

Resets all of the base archive members.

Reimplemented from FArchiveState.

Reimplemented in FLocalFileStreamFArchive, FArchiveMD5, FBitWriter, FArchiveCrc32, and FOutBunch.

◆ ResetCustomVersions()

void FArchiveState::ResetCustomVersions ( )
virtual

Resets the custom version numbers for this archive.

Reimplemented from FArchiveState.

Reimplemented in FNameTableArchiveReader, and FArchiveProxy.

◆ Seek()

◆ Serialize()

◆ SerializeBits()

virtual void FArchive::SerializeBits ( void V,
int64  LengthBits 
)
inlinevirtual

◆ SerializeBulkData()

virtual bool FArchive::SerializeBulkData ( FBulkData BulkData,
const FBulkDataSerializationParams Params 
)
inlinevirtual

Serialize bulk data.

Parameters
BulkDataBulk data object to serialize
ParamsSerialization parameters
Returns
true if the bulk data was serialized, false to fallback to default serialization (inline)

Reimplemented in FArchiveProxy, FExportArchive, FLinkerLoad, and FLinkerSave.

◆ SerializeCompressed()

void FArchive::SerializeCompressed ( void V,
int64  Length,
FName  CompressionFormatCannotChange,
ECompressionFlags  Flags = COMPRESS_NoFlags,
bool  bTreatBufferAsFileReader = false 
)

Serializes and compresses/ uncompresses data. This is a shared helper function for compression support.

Do not use SerializeCompressed in new code, prefer SerializeCompressedNew instead. SerializeCompressedNew can be dropped in to any existing use of SerializeCompressed.

Parameters
VData pointer to serialize data from/ to
LengthLength of source data if we're saving, unused otherwise
CompressionFormatCannotChangeCompression Format to use for encoding & decoding - cannot be changed without breaking file compatibility
FlagsFlags to control what method to use for [de]compression and optionally control memory vs speed when compressing
bTreatBufferAsFileReadertrue if V is actually an FArchive, which is used when saving to read data - helps to avoid single huge allocations of source data

◆ SerializeCompressedNew() [1/2]

void FArchive::SerializeCompressedNew ( void V,
int64  Length 
)

Serializes and compresses/ uncompresses data with default compressor choices.

Default compressors are Oodle for new data and Zlib when loading legacy data.

Parameters
VData pointer to serialize data from/ to
LengthLength of source data if we're saving, unused otherwise

◆ SerializeCompressedNew() [2/2]

void FArchive::SerializeCompressedNew ( void V,
int64  Length,
FName  CompressionFormatToEncode,
FName  CompressionFormatToDecodeOldV1Files,
ECompressionFlags  Flags = COMPRESS_NoFlags,
bool  bTreatBufferAsFileReader = false,
int64 OutPartialReadLength = nullptr 
)

Serializes and compresses/ uncompresses data. This is a shared helper function for compression support.

call SerializeCompressedNew instead of SerializeCompressed Typically you should not serializing data compressed if it will be packaged or stored in the DDC. Prefer to allow the package/iostore system to do the compression for you instead.

SerializeCompressedNew can read existing data written by old SerializeCompressed calls.

Parameters
VData pointer to serialize data from/ to
LengthLength of source data if we're saving, unused otherwise
CompressionFormatToEncodeCompression Format to use for encoding, can be changed freely without breaking compatibility
CompressionFormatToDecodeOldV1FilesCompression Format to decode old data with that didn't write compressor in header, cannot change, usually NAME_Zlib
FlagsFlags to control what method to use for [de]compression and optionally control memory vs speed when compressing
bTreatBufferAsFileReadertrue if V is actually an FArchive, which is used when saving to read data - helps to avoid single huge allocations of source data
OutPartialReadLengthif not null, partial reads are allowed and the size is filled here

◆ SerializeInt()

virtual void FArchive::SerializeInt ( uint32 Value,
uint32  Max 
)
inlinevirtual

◆ SerializeIntPacked()

void FArchive::SerializeIntPacked ( uint32 Value)
virtual

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

Reimplemented in UE::AssetDataGather::Private::FChecksumArchiveBase, FArchiveProxy, FBitReader, and FBitWriter.

◆ SerializeIntPacked64()

void FArchive::SerializeIntPacked64 ( uint64 Value)
virtual

◆ SetArchiveState()

void FArchiveState::SetArchiveState ( const FArchiveState InState)

Modifies current archive state, can be used to override flags.

◆ SetByteSwapping()

void FArchiveState::SetByteSwapping ( bool  Enabled)
inline

Toggle byte order swapping. This is needed in rare cases when we already know that the data swapping has already occurred or if we know that it will be handled later.

Parameters
Enabledset to true to enable byte order swapping

◆ SetCompressionMap()

virtual bool FArchive::SetCompressionMap ( TArray< FCompressedChunk > *  CompressedChunks,
ECompressionFlags  CompressionFlags 
)
inlinevirtual

Sets mapping from offsets/ sizes that are going to be used for seeking and serialization to what is actually stored on disk. If the archive supports dealing with compression in this way it is going to return true.

Parameters
CompressedChunksPointer to array containing information about [un]compressed chunks
CompressionFlagsFlags determining compression format associated with mapping
Returns
true if archive supports translating offsets & uncompressing on read, false otherwise

Reimplemented in FArchiveProxy, and FAsyncArchive.

◆ SetCookData()

void FArchive::SetCookData ( FArchiveCookData InCookData)
inline

◆ SetCriticalError()

void FArchiveState::SetCriticalError ( )

Sets the archiver IsCriticalError and IsError to true. Also sets CriticalError in the proxy archiver if one is wrapping this.

◆ SetCustomVersion()

void FArchiveState::SetCustomVersion ( const struct FGuid Key,
int32  Version,
FName  FriendlyName 
)

Sets a specific custom version

Parameters
Key- The guid of the custom version to query.
Version- The version number to set key to
FriendlyName- Friendly name corresponding to the key

◆ SetCustomVersions()

void FArchiveState::SetCustomVersions ( const FCustomVersionContainer CustomVersionContainer)
virtual

Sets the custom version numbers for this archive.

Parameters
CustomVersionContainer- The container of custom versions to copy into the archive.

Reimplemented from FArchiveState.

Reimplemented in FNameTableArchiveReader, and FArchiveProxy.

◆ SetDebugSerializationFlags()

virtual void FArchiveState::SetDebugSerializationFlags ( uint32  InCustomFlags)
inlinevirtual

Sets the archives custom serialization modifier flags (nothing to do with PortFlags or Custom versions)

Parameters
InCustomFlagsthe new flags to use for custom serialization

Reimplemented from FArchiveState.

Reimplemented in FArchiveProxy, and FLinkerSave.

◆ SetEngineNetVer()

void FArchiveState::SetEngineNetVer ( const uint32  InEngineNetVer)
virtual

Sets the archive engine network version.

Reimplemented from FArchiveState.

Reimplemented in FInBunch.

◆ SetEngineVer()

void FArchiveState::SetEngineVer ( const FEngineVersionBase InVer)
virtual

Sets the archive engine version. Used by the code that makes sure that FLinkerLoad's internal archive versions match the file reader it creates.

Parameters
InVernew version number

Reimplemented from FArchiveState.

◆ SetError()

void FArchiveState::SetError ( )

Sets ArIsError to true. Also sets error in the proxy archiver if one is wrapping this.

◆ SetFilterEditorOnly()

virtual void FArchiveState::SetFilterEditorOnly ( bool  InFilterEditorOnly)
inlinevirtual

Sets a flag indicating that this archive needs to filter editor-only content.

Parameters
InFilterEditorOnlyWhether to filter editor-only content.

Reimplemented from FArchiveState.

Reimplemented in FLinkerSave, and FArchiveProxy.

◆ SetForceUnicode()

void FArchiveState::SetForceUnicode ( bool  bInForceUnicode)
virtual

Sets whether this archive wants to force saving as Unicode. This is needed when we need to make sure ANSI strings are saved as Unicode.

Parameters
bInForceUnicodetrue if this archive wants to force saving as Unicode, false otherwise.

Reimplemented from FArchiveState.

◆ SetGameNetVer()

void FArchiveState::SetGameNetVer ( const uint32  InGameNetVer)
virtual

Sets the archive game network version.

Reimplemented from FArchiveState.

Reimplemented in FInBunch.

◆ SetIsLoading()

void FArchiveState::SetIsLoading ( bool  bInIsLoading)
virtual

Sets whether this archive is for loading data.

Parameters
bInIsLoadingtrue if this archive is for loading, false otherwise.

Reimplemented from FArchiveState.

◆ SetIsLoadingFromCookedPackage()

void FArchiveState::SetIsLoadingFromCookedPackage ( bool  bInIsLoadingFromCookedPackage)
virtual

Sets whether the archive is loading from a cooked package.

Parameters
bInIsLoadingFromCookedPackagetrue if this archive is loading from a cooked package, false otherwise

Reimplemented from FArchiveState.

◆ SetIsPersistent()

void FArchiveState::SetIsPersistent ( bool  bInIsPersistent)
virtual

Sets whether this archive is to persistent storage.

Parameters
bInIsPersistenttrue if this archive is to persistent storage, false otherwise.

Reimplemented from FArchiveState.

◆ SetIsSaving()

void FArchiveState::SetIsSaving ( bool  bInIsSaving)
virtual

Sets whether this archive is for saving data.

Parameters
bInIsSavingtrue if this archive is for saving, false otherwise.

Reimplemented from FArchiveState.

◆ SetIsTextFormat()

void FArchiveState::SetIsTextFormat ( bool  bInIsTextFormat)
virtual

Sets whether this archive is in text format.

Parameters
bInIsTextFormattrue if this archive is in text format, false otherwise.

Reimplemented from FArchiveState.

◆ SetIsTransacting()

void FArchiveState::SetIsTransacting ( bool  bInIsTransacting)
virtual

Sets whether this archive is for transacting.

Parameters
bInIsTransactingtrue if this archive is for transacting, false otherwise.

Reimplemented from FArchiveState.

◆ SetLicenseeUEVer()

void FArchiveState::SetLicenseeUEVer ( int32  InVer)
virtual

Sets the archive licensee version number. Used by the code that makes sure that FLinkerLoad's internal archive versions match the file reader it creates.

Parameters
Vernew version number

Reimplemented from FArchiveState.

◆ SetMigratingRemoteObjects()

void FArchiveState::SetMigratingRemoteObjects ( bool  bMigrating)

If set true, this archive is migrating remote objects

Parameters
bMigratingWhether this archive is migrating remote objects

◆ SetPortFlags()

void FArchiveState::SetPortFlags ( uint32  InPortFlags)
inline

Sets the archive's property serialization modifier flags

Parameters
InPortFlagsthe new flags to use for property serialization

◆ SetSavePackageData()

void FArchiveState::SetSavePackageData ( FArchiveSavePackageData InSavePackageData)
inline

Marks that this archive is one of the archives used by SavePackage, and provides access to data and functions used only during savepackage, such as the cook data bundle for information about the cook being conducted (if applicable) and writing build dependencies for assetregistry. Must be set only after setting the loading/saving/transacting flags.

◆ SetSavingOptionalObject()

virtual void FArchiveState::SetSavingOptionalObject ( bool  InSavingOptionalObject)
inlinevirtual

Set whether or not this archive is current serializing an Optional object

See also
EClassFlags::CLASS_Optional
Parameters
InFilterEditorOnlyWhether to filter editor-only content.

Reimplemented from FArchiveState.

◆ SetSerializeContext()

virtual void FArchiveState::SetSerializeContext ( FUObjectSerializeContext InLoadContext)
inlinevirtual

Sets the current UObject serialization context for this archive.

Reimplemented from FArchiveState.

◆ SetSerializedProperty()

virtual void FArchiveState::SetSerializedProperty ( FProperty InProperty)
inlinevirtual

Overrides the property that is currently being serialized

Note
: You likely want to call PushSerializedProperty/PopSerializedProperty instead
Parameters
InPropertyPointer to the property that is currently being serialized

Reimplemented from FArchiveState.

Reimplemented in FArchiveProxy, and FLinkerSave.

◆ SetSerializedPropertyChain()

void FArchiveState::SetSerializedPropertyChain ( const FArchiveSerializedPropertyChain InSerializedPropertyChain,
class FProperty InSerializedPropertyOverride = nullptr 
)
virtual

Set the raw serialized property chain for this archive, optionally overriding the serialized property too (or null to use the head of the property chain)

Reimplemented from FArchiveState.

Reimplemented in FArchiveProxy, and FLinkerSave.

◆ SetShouldSkipCompilingAssets()

void FArchiveState::SetShouldSkipCompilingAssets ( bool  Enabled)
inlineprotected

Set whether or not it is allowed to skip serialization on assets still being compiled to avoid waiting unless strictly necessary.

Parameters
EnabledSet to true to enable skip serialization on compiling assets.

◆ SetShouldSkipUpdateCustomVersion()

void FArchiveState::SetShouldSkipUpdateCustomVersion ( bool  bShouldSkip)

If set true, UsingCurrentVersion will not query the version registry to get the latest version data for the key if the version key is already set in the local container. Querying the version registry is not cheap, and the look up time increases as more custom versions are registered, therefore if you don't change the registered custom version data once is set in the archive Setting this to true should improve serialization performance by skipping the step entirely.

Parameters
bShouldSkipWhether we should skip the checking the version registry for new version data if the version key is already set

◆ SetUEVer()

void FArchiveState::SetUEVer ( FPackageFileVersion  InVer)
virtual

Sets the archive version number. Used by the code that makes sure that FLinkerLoad's internal archive versions match the file reader it creates.

Parameters
UEVernew version number

Reimplemented from FArchiveState.

◆ SetUseUnversionedPropertySerialization()

void FArchiveState::SetUseUnversionedPropertySerialization ( bool  bInUseUnversioned)
virtual

Sets whether tagged property serialization should be replaced by faster unversioned serialization. This assumes writer and reader share the same property definitions.

Reimplemented from FArchiveState.

Reimplemented in FLinkerSave.

◆ SetWantBinaryPropertySerialization()

void FArchiveState::SetWantBinaryPropertySerialization ( bool  bInWantBinaryPropertySerialization)
virtual

Sets whether this archive wants binary property serialization.

Parameters
bInWantBinaryPropertySerializationtrue if this archive wants binary serialization, false otherwise.

Reimplemented from FArchiveState.

◆ ShouldSkipBulkData()

UE_FORCEINLINE_HINT bool FArchiveState::ShouldSkipBulkData ( ) const
inline

Returns true if this archive should ignore bulk data.

◆ ShouldSkipCompilingAssets()

UE_FORCEINLINE_HINT bool FArchiveState::ShouldSkipCompilingAssets ( ) const
inline

Returns true if it is allowed to skip serialization on assets still being compiled to avoid waiting unless strictly necessary.

◆ ShouldSkipProperty()

virtual bool FArchiveState::ShouldSkipProperty ( const FProperty InProperty) const
inlinevirtual

Checks whether the archive wants to skip the property independent of the other flags

Reimplemented from FArchiveState.

Reimplemented in FArchiveProxy, FTextReferencesArchive, FPackageHarvester, FLinkerSave, FDataCachePropertyWriter, FDataCachePropertyReader, FPIEFixupSerializer, and UE::Transaction::FDiffableObjectDataWriter.

◆ ShouldSkipUpdateCustomVersion()

UE_FORCEINLINE_HINT bool FArchiveState::ShouldSkipUpdateCustomVersion ( ) const
inline

Returns true if this Archive does not update the custom version data for a given key if has already been set previously in the local custom versions container

◆ StartSerializingDefaults()

void FArchive::StartSerializingDefaults ( )
inline

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

◆ StopSerializingDefaults()

void FArchive::StopSerializingDefaults ( )
inline

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

◆ Tell()

◆ ThisContainsCode()

void FArchiveState::ThisContainsCode ( )
inline

Sets a flag indicating that this archive contains native or generated code.

◆ ThisContainsMap()

void FArchiveState::ThisContainsMap ( )
inline

Sets a flag indicating that this archive contains a ULevel or UWorld object.

◆ ThisRequiresLocalizationGather()

void FArchiveState::ThisRequiresLocalizationGather ( )

Sets a flag indicating that this archive contains data required to be gathered for localization.

◆ TotalSize()

◆ UEVer()

UE_FORCEINLINE_HINT FPackageFileVersion FArchiveState::UEVer ( ) const
inline

Returns the global engine serialization version used for this archive.

◆ UnlinkProxy()

void FArchiveState::UnlinkProxy ( FArchiveState Inner,
FArchiveState Proxy 
)
staticprotected

◆ UseToResolveEnumerators()

virtual bool FArchiveState::UseToResolveEnumerators ( ) const
inlinevirtual

Checks whether the archive is used to resolve out-of-date enum indexes If function returns true, the archive should be called only for objects containing user defined enum

Returns
true if the archive is used to resolve out-of-date enum indexes

Reimplemented from FArchiveState.

Reimplemented in FArchiveProxy.

◆ UseUnversionedPropertySerialization()

UE_FORCEINLINE_HINT bool FArchiveState::UseUnversionedPropertySerialization ( ) const
inline

Returns true if tagged property serialization should be replaced by faster unversioned serialization. This assumes writer and reader share the same property definitions.

◆ UsingCustomVersion()

void FArchive::UsingCustomVersion ( const struct FGuid Guid)
virtual

Registers the custom version to the archive. This is used to inform the archive that custom version information is about to be stored. There is no effect when the archive is being loaded from.

Parameters
GuidThe guid of the custom version. This must have previously been registered with FCustomVersionRegistration.

Reimplemented in FLinkerSave.

◆ WantBinaryPropertySerialization()

UE_FORCEINLINE_HINT bool FArchiveState::WantBinaryPropertySerialization ( ) const
inline

Returns true if this archive wants properties to be serialized in binary form instead of safer but slower tagged form.

Friends And Related Symbol Documentation

◆ operator<< [1/15]

FArchive & operator<< ( FArchive Ar,
ANSICHAR Value 
)
friend

Serializes an ANSICHAR value from or into an archive.

Parameters
ArThe archive to serialize from or to.
ValueThe value to serialize.

◆ operator<< [2/15]

FArchive & operator<< ( FArchive Ar,
bool D 
)
friend

Serializes a Boolean value from or into an archive.

Parameters
ArThe archive to serialize from or to.
ValueThe value to serialize.

◆ operator<< [3/15]

FArchive & operator<< ( FArchive Ar,
double Value 
)
friend

Serializes a double precision floating point value from or into an archive.

Parameters
ArThe archive to serialize from or to.
ValueThe value to serialize.

◆ operator<< [4/15]

FArchive & operator<< ( FArchive Ar,
float Value 
)
friend

Serializes a single precision floating point value from or into an archive.

Parameters
ArThe archive to serialize from or to.
ValueThe value to serialize.

◆ operator<< [5/15]

CORE_API FArchive & operator<< ( FArchive Ar,
FString &  Value 
)
friend

Serializes an FString value from or into an archive.

Parameters
ArThe archive to serialize from or to.
ValueThe value to serialize.

◆ operator<< [6/15]

FArchive & operator<< ( FArchive Ar,
int16 Value 
)
friend

Serializes a signed 16-bit integer value from or into an archive.

Parameters
ArThe archive to serialize from or to.
ValueThe value to serialize.

◆ operator<< [7/15]

FArchive & operator<< ( FArchive Ar,
int32 Value 
)
friend

Serializes a signed 32-bit integer value from or into an archive.

Parameters
ArThe archive to serialize from or to.
ValueThe value to serialize.

◆ operator<< [8/15]

FArchive & operator<< ( FArchive Ar,
int64 Value 
)
friend

Serializes a signed 64-bit integer value from or into an archive.

Parameters
ArThe archive to serialize from or to.
ValueThe value to serialize.

◆ operator<< [9/15]

FArchive & operator<< ( FArchive Ar,
int8 Value 
)
friend

Serializes a signed 8-bit integer value from or into an archive.

Parameters
ArThe archive to serialize from or to.
ValueThe value to serialize.

◆ operator<< [10/15]

FArchive & operator<< ( FArchive Ar,
uint16 Value 
)
friend

Serializes an unsigned 16-bit integer value from or into an archive.

Parameters
ArThe archive to serialize from or to.
ValueThe value to serialize.

◆ operator<< [11/15]

FArchive & operator<< ( FArchive Ar,
uint32 Value 
)
friend

Serializes an unsigned 32-bit integer value from or into an archive.

Parameters
ArThe archive to serialize from or to.
ValueThe value to serialize.

◆ operator<< [12/15]

FArchive & operator<< ( FArchive Ar,
uint64 Value 
)
friend

Serializes a unsigned 64-bit integer value from or into an archive.

Parameters
ArThe archive to serialize from or to.
ValueThe value to serialize.

◆ operator<< [13/15]

FArchive & operator<< ( FArchive Ar,
uint8 Value 
)
friend

Serializes an unsigned 8-bit integer value from or into an archive.

Parameters
ArThe archive to serialize from or to.
ValueThe value to serialize.

◆ operator<< [14/15]

FArchive & operator<< ( FArchive Ar,
UTF32CHAR Value 
)
friend

Serializes a UTF32CHAR value from or into an archive.

Parameters
ArThe archive to serialize from or to.
ValueThe value to serialize.

◆ operator<< [15/15]

FArchive & operator<< ( FArchive Ar,
WIDECHAR Value 
)
friend

Serializes a WIDECHAR value from or into an archive.

Parameters
ArThe archive to serialize from or to.
ValueThe value to serialize.

Member Data Documentation

◆ ActiveFPLB

FFastPathLoadBuffer* FArchiveState::ActiveFPLB

◆ ArAllowLazyLoading

uint8 FArchiveState::ArAllowLazyLoading

Whether to allow lazy loading of bulk/secondary data.

◆ ArContainsCode

uint8 FArchiveState::ArContainsCode

Quickly tell if an archive contains script code.

◆ ArContainsMap

uint8 FArchiveState::ArContainsMap

Used to determine whether FArchive contains a level or world.

◆ ArCustomPropertyList

const struct FCustomPropertyListNode* FArchiveState::ArCustomPropertyList

Custom property list attribute. If the flag below is set, only these properties will be iterated during serialization. If NULL, then no properties will be iterated.

◆ ArForceByteSwapping

UE_DEPRECATED (5.6, "Public access to ArRequiresLocalizationGather has been deprecated - please use Ar.RequiresLocalizationGather() and Ar.ThisRequiresLocalizationGather() for getting and setting respectively.") uint8 ArRequiresLocalizationGather uint8 FArchiveState::ArForceByteSwapping

Used to determine whether FArchive contains data required to be gathered for localization. Whether we should forcefully swap bytes.

◆ ArIgnoreArchetypeRef

uint8 FArchiveState::ArIgnoreArchetypeRef

If true, we will not serialize archetype references for structs and classes.

◆ ArIgnoreClassGeneratedByRef

uint8 FArchiveState::ArIgnoreClassGeneratedByRef

If true, we will not serialize ClassGeneratedBy reference in UClass.

◆ ArIgnoreClassRef

uint8 FArchiveState::ArIgnoreClassRef

If true, UObject::Serialize will skip serialization of the Class property.

◆ ArIgnoreOuterRef

uint8 FArchiveState::ArIgnoreOuterRef

If true, we will not serialize the Outer reference in UObject.

◆ ArIsCountingMemory

uint8 FArchiveState::ArIsCountingMemory

Whether this archive is counting memory.

◆ ArIsFilterEditorOnly

uint8 FArchiveState::ArIsFilterEditorOnly

Whether editor only properties are being filtered from the archive (or has been filtered).

◆ ArIsModifyingWeakAndStrongReferences

uint8 FArchiveState::ArIsModifyingWeakAndStrongReferences

Whether a reference collector is modifying the references and wants both weak and strong ones

◆ ArIsNetArchive

uint8 FArchiveState::ArIsNetArchive

Whether or not this archive is sending/receiving network data

◆ ArIsObjectReferenceCollector

uint8 FArchiveState::ArIsObjectReferenceCollector

Whether this archive only cares about serializing object references.

◆ ArIsSaveGame

uint8 FArchiveState::ArIsSaveGame

Whether this archive is saving/loading game state

◆ ArIsSavingOptionalObject

uint8 FArchiveState::ArIsSavingOptionalObject

Whether we are currently serializing optional data

◆ ArMaxSerializeSize

int64 FArchiveState::ArMaxSerializeSize

Max size of data that this archive is allowed to serialize.

◆ ArMergeOverrides

uint8 FArchiveState::ArMergeOverrides

Set to false if OverriddenProperties should be cleared at the beginning of SerializeVersionedTaggedProperties.

◆ ArNoDelta

uint8 FArchiveState::ArNoDelta

If true, do not perform delta serialization of properties.

◆ ArNoIntraPropertyDelta

uint8 FArchiveState::ArNoIntraPropertyDelta

If true, do not perform delta serialization within properties (e.g. TMaps and TSets).

◆ ArPortFlags

uint32 FArchiveState::ArPortFlags

Modifier flags that be used when serializing UProperties

◆ ArPreserveArrayElements

uint8 FArchiveState::ArPreserveArrayElements

Set TRUE to stop arrays from being cleared before they're loaded. Instead, array data will be merged

◆ ArSerializingDefaults

int32 FArchiveState::ArSerializingDefaults

Whether we are currently serializing defaults. > 0 means yes, <= 0 means no.

◆ ArShouldSkipBulkData

uint8 FArchiveState::ArShouldSkipBulkData

Whether bulk data serialization should be skipped or not.

◆ ArUseCustomPropertyList

uint8 FArchiveState::ArUseCustomPropertyList

Set TRUE to use the custom property list attribute for serialization.

◆ InlineFPLB

FFastPathLoadBuffer FArchiveState::InlineFPLB

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