![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <Archive.h>
Inheritance diagram for FArchive:Classes | |
| class | FScopeSeekTo |
| class | FScopeSetDebugSerializationFlags |
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 | |
| FArchive & | operator<< (FArchive &Ar, ANSICHAR &Value) |
| FArchive & | operator<< (FArchive &Ar, WIDECHAR &Value) |
| FArchive & | operator<< (FArchive &Ar, UTF32CHAR &Value) |
| FArchive & | operator<< (FArchive &Ar, uint8 &Value) |
| FArchive & | operator<< (FArchive &Ar, int8 &Value) |
| FArchive & | operator<< (FArchive &Ar, uint16 &Value) |
| FArchive & | operator<< (FArchive &Ar, int16 &Value) |
| FArchive & | operator<< (FArchive &Ar, uint32 &Value) |
| FArchive & | operator<< (FArchive &Ar, bool &D) |
| FArchive & | operator<< (FArchive &Ar, int32 &Value) |
| FArchive & | operator<< (FArchive &Ar, float &Value) |
| FArchive & | operator<< (FArchive &Ar, double &Value) |
| FArchive & | operator<< (FArchive &Ar, uint64 &Value) |
| FArchive & | operator<< (FArchive &Ar, int64 &Value) |
| CORE_API FArchive & | operator<< (FArchive &Ar, FString &Value) |
Base class for archives that can be used for loading, saving, and garbage collecting in a byte order neutral way.
|
default |
|
default |
|
virtualdefault |
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.
|
inlinevirtual |
Attaches/ associates the passed in bulk data object with the linker.
| Owner | UObject owning the bulk data |
| BulkData | Bulk data object to associate |
Reimplemented in FArchiveProxy.
|
inlinevirtual |
Adds external read dependency
Reimplemented in FArchiveProxy, FExportArchive, FLinkerLoad, and FShaderPipelineCacheArchive.
Serialize data of Length bytes, taking into account byte swapping if needed.
Used to do byte swapping on small items. This does not happen usually, so we don't want it inline.
| void FArchiveState::ClearError | ( | ) |
Sets ArIsError to false, this does not clear any CriticalErrors
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.
|
inline |
Returns true if this archive contains native or generated code.
|
inline |
|
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.
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.
Queries a custom version from the archive. If the archive is being used to write, the custom version must have already been registered.
| Key | The guid of the custom version to query. |
|
inlinevirtual |
Detaches the passed in bulk data object from the linker.
| BulkData | Bulk data object to detach |
| bEnsureBulkDataIsLoaded | Whether to ensure that the bulk data is loaded before detaching |
Reimplemented in FArchiveProxy.
|
inlinevirtual |
|
inline |
Returns true if this archive should handle delta serialization for properties.
|
inline |
Returns true if this archive should perform delta serialization within properties (e.g. TMaps and TSets).
|
virtual |
Returns the engine-global network protocol version for this archive.
Reimplemented from FArchiveState.
Reimplemented in FInBunch.
|
inline |
Returns the compiled engine version used for this archive.
Attempts to finish writing any buffered data to disk/permanent storage.
Reimplemented in FAsyncWriter, FArchiveSaveCompressedProxy, FArchiveProxy, FTransactionallySafeArchiveWriter, and FArchiveFileWriterGeneric.
Flushes cache and frees internal data.
Reimplemented in FArchiveProxy, FAsyncArchive, FLinkerLoad, and FArchiveFileReaderGeneric.
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.
|
inline |
Returns true if this archive should always swap bytes, ignoring endian rules.
|
virtual |
Returns the game-specific network protocol version for this archive.
Reimplemented from FArchiveState.
Reimplemented in FInBunch.
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.
|
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.
|
inline |
Returns the low level archive state for this archive.
|
inline |
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.
|
inline |
|
inline |
|
virtual |
Gets the custom version numbers for this archive. These are used to check for system or game-specific version numbers.
Reimplemented from FArchiveState.
Reimplemented in FNameTableArchiveReader, FArchiveProxy, and FMaterialResourceMemoryWriter.
|
inline |
Returns the editor-only debug serialization flags.
|
inline |
|
inlinevirtual |
Returns lowest level archive state, proxy archives will override this.
Reimplemented from FArchiveState.
Reimplemented in FArchiveProxy.
If this archive is a FLinkerLoad or FLinkerSave, returns a pointer to the ULinker portion.
Reimplemented from FArchiveState.
Reimplemented in FLinkerSave, FArchiveProxy, and FLinkerLoad.
|
inline |
Returns the maximum size of data that this archive is allowed to serialize.
|
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 >.
|
inline |
Returns this archive's property serialization modifier flags.
|
inline |
|
inline |
Gets the property that is currently being serialized
|
inline |
Get the raw serialized property chain for this archive
Gets the chain of properties that are currently being serialized
|
inline |
Checks to see if all of the passed in property serialization modifier flags are set.
|
inline |
Checks to see if any of the passed in property serialization modifier flags are set.
|
inline |
Returns true if this archive sould allow lazy loading of bulk / secondary data.
|
inline |
Returns true if data larger than 1 byte should be swapped to deal with endian mismatches.
|
inline |
Checks whether the archive is used for cooking.
|
inline |
Returns true if this archive is counting memory, normally CountBytes is called to get the size.
|
inline |
Returns true if this archive contains critical errors that cannot be recovered from.
|
inline |
Returns true if this archive contains errors, which means that further serialization is generally not safe.
|
inline |
Indicates whether this archive is filtering editor-only on save or contains data that had editor-only content stripped.
|
inline |
Returns true if this archive wants to always save strings in UTF16 format even if they are ANSI characters.
|
inline |
Returns true if this archive should ignore archetype references for structs and classes.
|
inline |
Returns true if this archive should ignore the ClassGeneratedBy reference in UClass.
|
inline |
Returns true if this archive should ignore the Class reference in UObject.
|
inline |
Returns true if this archive should ignore the Outer reference in UObject.
|
inline |
Returns true if this archive is for loading data.
|
inline |
Returns true if this archive is loading from a cooked package.
|
inlineconstexpr |
Returns true if this Archive is migrating remote object
|
inline |
Returns true if this archive should modify/search weak object references as well as strong ones.
|
inline |
Whether or not this archive is serializing data being sent/received by the netcode
|
inline |
Returns true if this archive is only looking for UObject references. This can be false for reference collectors looking for more general references.
|
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.
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.
| BulkData | Bulk data object to detach |
| bEnsureBulkDataIsLoaded | Whether to ensure that the bulk data is loaded before detaching |
Reimplemented in FArchiveProxy.
|
inline |
Indicates whether this archive is saving or loading game state
|
inline |
Returns true if this archive is for saving data, this can also be a pre-save preparation archive.
|
inline |
Indicates when the archive is serializing an Optional object. Will only return true when Ar.IsSaving() is also true
|
inline |
Returns true if this archive is currently serializing class/struct default values.
|
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.
|
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.
|
inline |
Returns the licensee-specific version used for this archive, will be 0 by default.
|
staticprotected |
Called when an object stops serializing property data using script serialization.
Reimplemented in FArchiveProxy, FLinkerLoad, FLinkerSave, UE::Transaction::FDiffableObjectDataWriter, FCPFUOWriter, and FCPFUOReader.
Called when an object begins serializing property data using script serialization.
Reimplemented in FArchiveProxy, FLinkerLoad, FLinkerSave, UE::Transaction::FDiffableObjectDataWriter, FCPFUOWriter, and FCPFUOReader.
|
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.
Serializes a Field value from or into this archive.
This operator can be implemented by sub-classes that wish to serialize UObject instances.
| Value | The value to serialize. |
Reimplemented in FArchiveScriptReferenceCollector, FArchiveReplaceObjectAndStructPropertyRef< T >, FArchiveMD5, FMemoryArchive, FExportArchive, FArchiveUObject, FBulkDataReader, FBulkDataWriter, FLinkerSave, UE::Transaction::FSerializedObjectDataReader, UE::Transaction::FSerializedObjectDataWriter, UE::Transaction::FDiffableObjectDataWriter, FArchiveProxy, and FPropertyProxyArchive.
Serializes an FName value from or into this archive.
This operator can be implemented by sub-classes that wish to serialize FName instances.
| Value | The value to serialize. |
Reimplemented in FNameAsStringProxyArchive, FMemoryArchive, UE::Transaction::FSerializedObjectDataReader, UE::Transaction::FSerializedObjectDataWriter, UE::Transaction::FDiffableObjectDataWriter, FArchiveCrc32, FArchiveObjectCrc32, UE::StructUtils::FArchiveCityHash64, FBulkDataReader, FBulkDataWriter, FMaterialResourceMemoryWriter, FMaterialResourceProxyReader, FArchiveMD5, FLinkerSave, FNameAsStringIndexProxyArchive, FObjectReader, FObjectWriter, FManifestWriter, FManifestReader, FNameTableArchiveReader, FControlChannelOutBunch, FPackageReader, UE::AssetRegistry::FNameMapAwareArchive, FExportArchive, UE::RemoteObject::Serialization::FArchiveRemoteObjectWriter, UE::RemoteObject::Serialization::FArchiveRemoteObjectReader, FPackageHarvester, FNetBitWriter, FNetBitReader, FDataCachePropertyWriter, FDataCachePropertyReader, Chaos::VisualDebugger::FChaosVDMemoryWriter, Chaos::VisualDebugger::FChaosVDMemoryReader, UE::JsonUtilities::FArchiveMD5Generator, FArchiveMD5, FMemoryArchive, FExportArchive, FArchiveUObject, FBulkDataReader, FBulkDataWriter, FLinkerSave, UE::Transaction::FSerializedObjectDataReader, UE::Transaction::FSerializedObjectDataWriter, UE::Transaction::FDiffableObjectDataWriter, FAssetRegistryReader, and FArchiveProxy.
Serializes an FText value from or into an archive.
| Ar | The archive to serialize from or to. |
| Value | The value to serialize. |
Reimplemented in FArchiveMD5, FMemoryArchive, FExportArchive, FArchiveUObject, FBulkDataReader, FBulkDataWriter, FLinkerSave, UE::Transaction::FSerializedObjectDataReader, UE::Transaction::FSerializedObjectDataWriter, UE::Transaction::FDiffableObjectDataWriter, UE::AssetDataGather::Private::FChecksumArchiveBase, FArchiveProxy, and FTextReferencesArchive.
|
virtual |
Serializes a lazy object pointer value from or into this archive.
Most of the time, FLazyObjectPtrs are serialized as UObject*, but some archives need to override this.
| Value | The value to serialize. |
Reimplemented in FExportArchive, FPackageHarvester, FObjectReader, FLinkerSave, FDataCachePropertyWriter, FDataCachePropertyReader, FPIEFixupSerializer, FEventParameterArchive, FArchiveProxy, FTextReferencesArchive, UE::RemoteObject::Serialization::FArchiveRemoteObjectWriter, UE::RemoteObject::Serialization::FArchiveRemoteObjectReader, FArchiveCrc32, FArchiveUObject, FObjectWriter, FLinkerSave, FObjectReaderWithReplacement, UE::Transaction::FSerializedObjectDataReader, UE::Transaction::FSerializedObjectDataWriter, UE::Transaction::FDiffableObjectDataWriter, FArchiveMD5, FMemoryArchive, FExportArchive, FArchiveUObject, FBulkDataReader, FBulkDataWriter, FLinkerSave, UE::Transaction::FSerializedObjectDataReader, UE::Transaction::FSerializedObjectDataWriter, and UE::Transaction::FDiffableObjectDataWriter.
|
virtual |
Serializes a wrapped object pointer value from or into this archive.
Most of the time, FObjectPtrs are serialized as UObject*, but some archives need to override this.
| Value | The value to serialize. |
Reimplemented in FArchiveReplaceObjectRef< T >, FArchiveReplaceObjectRef< UObject >, FObjectAndNameAsStringProxyArchive, FObjectAsTraceIdProxyArchive, FPropertyTrackingReferenceCollectorArchive, FArchiveScriptReferenceCollector, FReferenceCollectorArchive, FArchiveObjectCrc32, FDataCachePropertyWriter, FDataCachePropertyReader, FArchiveProxy, FExportArchive, FTextReferencesArchive, UE::RemoteObject::Serialization::FArchiveRemoteObjectWriter, UE::RemoteObject::Serialization::FArchiveRemoteObjectReader, UE::RemoteObject::Serialization::FArchiveRemoteReferencePatcher, UE::RemoteObject::Serialization::FArchiveSubObjectGatherer, FPackageHarvester, FArchiveCrc32, FArchiveUObject, FObjectReader, FObjectWriter, FNetBitWriter, FNetBitReader, FLinkerSave, FLinkerSave, FSoftObjectPathFixupArchive, FObjectReaderWithReplacement, UE::Transaction::FSerializedObjectDataReader, UE::Transaction::FSerializedObjectDataWriter, UE::Transaction::FDiffableObjectDataWriter, FArchiveMD5, FMemoryArchive, FExportArchive, FArchiveUObject, FBulkDataReader, FBulkDataWriter, FLinkerSave, UE::Transaction::FSerializedObjectDataReader, UE::Transaction::FSerializedObjectDataWriter, and UE::Transaction::FDiffableObjectDataWriter.
|
virtual |
Serializes soft object paths from or into this archive.
| Value | Soft object path to serialize. |
Reimplemented in FLinkerSave, FArchiveProxy, FExportArchive, FTextReferencesArchive, UE::RemoteObject::Serialization::FArchiveRemoteObjectWriter, UE::RemoteObject::Serialization::FArchiveRemoteObjectReader, FPackageHarvester, FArchiveCrc32, FArchiveReplaceObjectRef< T >, FArchiveReplaceObjectRef< UObject >, FArchiveUObject, FObjectAndNameAsStringProxyArchive, FObjectReader, FObjectWriter, FNetBitWriter, FNetBitReader, FLinkerSave, FSoftObjectPathFixupArchive, FPIEFixupSerializer, FObjectReaderWithReplacement, FObjectAsTraceIdProxyArchive, UE::Transaction::FSerializedObjectDataReader, UE::Transaction::FSerializedObjectDataWriter, UE::Transaction::FDiffableObjectDataWriter, FEventParameterArchive, FArchiveMD5, FMemoryArchive, FExportArchive, FArchiveUObject, FBulkDataReader, FBulkDataWriter, FLinkerSave, UE::Transaction::FSerializedObjectDataReader, UE::Transaction::FSerializedObjectDataWriter, and UE::Transaction::FDiffableObjectDataWriter.
|
virtual |
Serializes asset pointer from or into this archive.
Most of the time, FSoftObjectPtr are serialized as UObject *, but some archives need to override this.
| Value | The asset pointer to serialize. |
Reimplemented in FArchiveProxy, FExportArchive, FTextReferencesArchive, UE::RemoteObject::Serialization::FArchiveRemoteObjectWriter, UE::RemoteObject::Serialization::FArchiveRemoteObjectReader, FArchiveCrc32, FArchiveUObject, FObjectAndNameAsStringProxyArchive, FObjectReader, FObjectWriter, FNetBitWriter, FNetBitReader, FLinkerSave, FPIEFixupSerializer, FObjectReaderWithReplacement, FObjectAsTraceIdProxyArchive, UE::Transaction::FSerializedObjectDataReader, UE::Transaction::FSerializedObjectDataWriter, UE::Transaction::FDiffableObjectDataWriter, FEventParameterArchive, FArchiveMD5, FMemoryArchive, FExportArchive, FArchiveUObject, FBulkDataReader, FBulkDataWriter, FLinkerSave, UE::Transaction::FSerializedObjectDataReader, UE::Transaction::FSerializedObjectDataWriter, and UE::Transaction::FDiffableObjectDataWriter.
|
virtual |
Serializes FWeakObjectPtr value from or into this archive.
This operator can be implemented by sub-classes that wish to serialize FWeakObjectPtr instances.
| Value | The value to serialize. |
Reimplemented in FObjectAndNameAsStringProxyArchive, FObjectAsTraceIdProxyArchive, FArchiveProxy, FExportArchive, FTextReferencesArchive, UE::RemoteObject::Serialization::FArchiveRemoteObjectWriter, UE::RemoteObject::Serialization::FArchiveRemoteObjectReader, FArchiveCrc32, FArchiveUObject, FObjectReader, FObjectWriter, FLinkerSave, FArchiveGatherExternalActorRefs, FObjectReaderWithReplacement, UE::Transaction::FSerializedObjectDataReader, UE::Transaction::FSerializedObjectDataWriter, UE::Transaction::FDiffableObjectDataWriter, FEventParameterArchive, FArchiveMD5, FMemoryArchive, FExportArchive, FArchiveUObject, FBulkDataReader, FBulkDataWriter, FLinkerSave, UE::Transaction::FSerializedObjectDataReader, UE::Transaction::FSerializedObjectDataWriter, UE::Transaction::FDiffableObjectDataWriter, FPackageHarvester, FNetBitWriter, and FNetBitReader.
|
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.
| Value | The value to serialize. |
Serializes an UObject value from or into this archive.
This operator can be implemented by sub-classes that wish to serialize UObject instances.
| Value | The value to serialize. |
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.
|
virtual |
Pop a property that was previously being serialized off the property stack
| InProperty | Pointer to the property that was previously being serialized |
| bIsEditorOnlyProperty | True 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.
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.
| PrecacheOffset | Offset at which to begin precaching. |
| PrecacheSize | Number of bytes to precache |
Reimplemented in FPackageReader, FNameTableArchiveReader, FNonBufferingReadOnlyArchive, FArchiveFileReaderGeneric, FArchiveProxy, and FAsyncArchive.
Tells the archive to attempt to preload the specified object so data can be loaded out of it.
Reimplemented in FArchiveProxy, and FLinkerLoad.
|
inlinevirtual |
Called whilst cooking to provide file region hints to the cooker.
|
virtual |
Push a property that is currently being serialized onto the property stack
| InProperty | Pointer to the property that is currently being serialized |
| bIsEditorOnlyProperty | True 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.
|
inline |
Returns true if this archive contains data required to be gathered for localization.
Resets all of the base archive members.
Reimplemented from FArchiveState.
Reimplemented in FLocalFileStreamFArchive, FArchiveMD5, FBitWriter, FArchiveCrc32, and FOutBunch.
|
virtual |
Resets the custom version numbers for this archive.
Reimplemented from FArchiveState.
Reimplemented in FNameTableArchiveReader, and FArchiveProxy.
Attempts to set the current offset into backing data storage, this will do nothing if there is no storage.
Reimplemented in FArchiveLoadCompressedProxy, FArchiveSaveCompressedProxy, FBufferWriter, FBulkDataWriter, FLinkerSave, FHttpStreamFArchive, FInMemoryReplayStreamArchive, FPreloadableArchive, FPreloadableArchiveProxy, FBufferReaderBase, FMemoryArchive, FTransactionallySafeArchiveWriter, FPackageReader, FNameTableArchiveReader, FArchiveFileWriterDummy, FArchiveProxy, FAsyncArchive, FMaterialResourceProxyReader, UE::Transaction::FSerializedObjectDataReader, UE::Transaction::Internal::FSerializedObjectDataWriterCommon, FLocalFileStreamFArchive, FManifestWriter, FManifestReader, FSignedArchiveReader, FNonBufferingReadOnlyArchive, FArchiveFileReaderGeneric, FArchiveFileWriterGeneric, FExportArchive, and FLinkerExportArchive.
Reimplemented in FSkeletalMeshLODSizeCounter, FArchiveLoadCompressedProxy, FArchiveSaveCompressedProxy, FArrayReader, FArchiveObjectCrc32, FExportArchive, FArchiveStackTraceWriter, UE::JsonUtilities::FArchiveMD5Generator, FSignedArchiveReader, FBufferWriter, FMemoryReader, FMemoryReaderView, FStaticMemoryReader, FBulkDataWriter, FObjectReader, FBufferReaderBase, FArchiveMD5, TMemoryHasher< HashBuilder, HashDigest >, TMemoryWriterBase< ArrayAllocatorType >, FTransactionallySafeArchiveWriter, FAsyncArchive, UE::StructUtils::FArchiveCityHash64, FArchiveCrc32, FCPFUOWriter, FCPFUOReader, FEventParameterWriter, FEventParameterReader, FSharedMemoryReader, FSharedMemoryWriter, FManifestWriter, FManifestReader, FBitReader, FAsyncWriter, FLargeMemoryWriter, FArchiveStackTraceMemoryWriter, FArchiveStackTrace, FLargeMemoryReader, FArchiveStackTraceReader, UE::Transaction::FSerializedObjectDataReader, UE::Transaction::Internal::FSerializedObjectDataWriterCommon, FBitWriter, UE::AssetDataGather::Private::FChecksumArchiveWriter, UE::AssetDataGather::Private::FChecksumArchiveReader, FLinkerSave, FHttpStreamFArchive, FInMemoryReplayStreamArchive, FPreloadableArchive, FPreloadableArchiveProxy, FPackageReader, FNameTableArchiveReader, FArchiveFileWriterDummy, FArchiveProxy, FLocalFileStreamFArchive, FArchiveWithDelegateV2, FNonBufferingReadOnlyArchive, FArchiveFileReaderGeneric, and FArchiveFileWriterGeneric.
Reimplemented in UE::AssetDataGather::Private::FChecksumArchiveBase, FArchiveProxy, FBitReader, and FBitWriter.
|
inlinevirtual |
Serialize bulk data.
| BulkData | Bulk data object to serialize |
| Params | Serialization parameters |
Reimplemented in FArchiveProxy, FExportArchive, FLinkerLoad, and FLinkerSave.
| 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.
| V | Data pointer to serialize data from/ to |
| Length | Length of source data if we're saving, unused otherwise |
| CompressionFormatCannotChange | Compression Format to use for encoding & decoding - cannot be changed without breaking file compatibility |
| Flags | Flags to control what method to use for [de]compression and optionally control memory vs speed when compressing |
| bTreatBufferAsFileReader | true if V is actually an FArchive, which is used when saving to read data - helps to avoid single huge allocations of source data |
Serializes and compresses/ uncompresses data with default compressor choices.
Default compressors are Oodle for new data and Zlib when loading legacy data.
| V | Data pointer to serialize data from/ to |
| Length | Length of source data if we're saving, unused otherwise |
| 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.
| V | Data pointer to serialize data from/ to |
| Length | Length of source data if we're saving, unused otherwise |
| CompressionFormatToEncode | Compression Format to use for encoding, can be changed freely without breaking compatibility |
| CompressionFormatToDecodeOldV1Files | Compression Format to decode old data with that didn't write compressor in header, cannot change, usually NAME_Zlib |
| Flags | Flags to control what method to use for [de]compression and optionally control memory vs speed when compressing |
| bTreatBufferAsFileReader | true if V is actually an FArchive, which is used when saving to read data - helps to avoid single huge allocations of source data |
| OutPartialReadLength | if not null, partial reads are allowed and the size is filled here |
Reimplemented in FBitReader, UE::AssetDataGather::Private::FChecksumArchiveBase, FArchiveProxy, and FBitWriter.
Packs int value into bytes of 7 bits with 8th bit for 'more'
Reimplemented in UE::AssetDataGather::Private::FChecksumArchiveBase, FArchiveProxy, FBitReader, and FBitWriter.
| void FArchiveState::SetArchiveState | ( | const FArchiveState & | InState | ) |
Modifies current archive state, can be used to override flags.
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.
| Enabled | set to true to enable byte order swapping |
|
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.
| CompressedChunks | Pointer to array containing information about [un]compressed chunks |
| CompressionFlags | Flags determining compression format associated with mapping |
Reimplemented in FArchiveProxy, and FAsyncArchive.
|
inline |
| void FArchiveState::SetCriticalError | ( | ) |
Sets the archiver IsCriticalError and IsError to true. Also sets CriticalError in the proxy archiver if one is wrapping this.
| void FArchiveState::SetCustomVersion | ( | const struct FGuid & | Key, |
| int32 | Version, | ||
| FName | FriendlyName | ||
| ) |
Sets a specific custom version
| Key | - The guid of the custom version to query. |
| Version | - The version number to set key to |
| FriendlyName | - Friendly name corresponding to the key |
|
virtual |
Sets the custom version numbers for this archive.
| CustomVersionContainer | - The container of custom versions to copy into the archive. |
Reimplemented from FArchiveState.
Reimplemented in FNameTableArchiveReader, and FArchiveProxy.
Sets the archives custom serialization modifier flags (nothing to do with PortFlags or Custom versions)
| InCustomFlags | the new flags to use for custom serialization |
Reimplemented from FArchiveState.
Reimplemented in FArchiveProxy, and FLinkerSave.
Sets the archive engine network version.
Reimplemented from FArchiveState.
Reimplemented in FInBunch.
|
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.
| InVer | new version number |
Reimplemented from FArchiveState.
| void FArchiveState::SetError | ( | ) |
Sets ArIsError to true. Also sets error in the proxy archiver if one is wrapping this.
Sets a flag indicating that this archive needs to filter editor-only content.
| InFilterEditorOnly | Whether to filter editor-only content. |
Reimplemented from FArchiveState.
Reimplemented in FLinkerSave, and FArchiveProxy.
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.
| bInForceUnicode | true if this archive wants to force saving as Unicode, false otherwise. |
Reimplemented from FArchiveState.
Sets whether this archive is for loading data.
| bInIsLoading | true if this archive is for loading, false otherwise. |
Reimplemented from FArchiveState.
Sets whether the archive is loading from a cooked package.
| bInIsLoadingFromCookedPackage | true if this archive is loading from a cooked package, false otherwise |
Reimplemented from FArchiveState.
Sets whether this archive is to persistent storage.
| bInIsPersistent | true if this archive is to persistent storage, false otherwise. |
Reimplemented from FArchiveState.
Sets whether this archive is for saving data.
| bInIsSaving | true if this archive is for saving, false otherwise. |
Reimplemented from FArchiveState.
Sets whether this archive is in text format.
| bInIsTextFormat | true if this archive is in text format, false otherwise. |
Reimplemented from FArchiveState.
Sets whether this archive is for transacting.
| bInIsTransacting | true if this archive is for transacting, false otherwise. |
Reimplemented from FArchiveState.
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.
| Ver | new version number |
Reimplemented from FArchiveState.
If set true, this archive is migrating remote objects
| bMigrating | Whether this archive is migrating remote objects |
Sets the archive's property serialization modifier flags
| InPortFlags | the new flags to use for property serialization |
|
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.
Set whether or not this archive is current serializing an Optional object
| InFilterEditorOnly | Whether to filter editor-only content. |
Reimplemented from FArchiveState.
|
inlinevirtual |
Sets the current UObject serialization context for this archive.
Reimplemented from FArchiveState.
Overrides the property that is currently being serialized
| InProperty | Pointer to the property that is currently being serialized |
Reimplemented from FArchiveState.
Reimplemented in FArchiveProxy, and FLinkerSave.
|
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.
Set whether or not it is allowed to skip serialization on assets still being compiled to avoid waiting unless strictly necessary.
| Enabled | Set to true to enable skip serialization on compiling assets. |
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.
| bShouldSkip | Whether we should skip the checking the version registry for new version data if the version key is already set |
|
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.
| UEVer | new version number |
Reimplemented from FArchiveState.
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.
|
virtual |
Sets whether this archive wants binary property serialization.
| bInWantBinaryPropertySerialization | true if this archive wants binary serialization, false otherwise. |
Reimplemented from FArchiveState.
|
inline |
Returns true if this archive should ignore bulk data.
|
inline |
Returns true if it is allowed to skip serialization on assets still being compiled to avoid waiting unless strictly necessary.
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.
|
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
|
inline |
Sets a flag indicating that this archive is currently serializing class/struct defaults.
|
inline |
Indicate that this archive is no longer serializing class/struct defaults.
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 FArchiveState.
Reimplemented in FArchiveLoadCompressedProxy, FArchiveSaveCompressedProxy, FBufferWriter, FBulkDataWriter, FDuplicateDataReader, FDuplicateDataWriter, FLinkerSave, FHttpStreamFArchive, FInMemoryReplayStreamArchive, FPreloadableArchive, FPreloadableArchiveProxy, FBufferReaderBase, FMemoryArchive, FTransactionallySafeArchiveWriter, FPackageReader, UE::AssetDataGather::Private::FChecksumArchiveWriter, UE::AssetDataGather::Private::FChecksumArchiveReader, FNameTableArchiveReader, FArchiveFileWriterDummy, FArchiveProxy, FExportArchive, FAsyncArchive, FLinkerExportArchive, FMaterialResourceProxyReader, UE::Transaction::FSerializedObjectDataReader, UE::Transaction::Internal::FSerializedObjectDataWriterCommon, FLocalFileStreamFArchive, FManifestWriter, FManifestReader, FSignedArchiveReader, FNonBufferingReadOnlyArchive, FArchiveFileReaderGeneric, and FArchiveFileWriterGeneric.
|
inline |
Sets a flag indicating that this archive contains native or generated code.
|
inline |
| void FArchiveState::ThisRequiresLocalizationGather | ( | ) |
Sets a flag indicating that this archive contains data required to be gathered for localization.
Returns total size of the backing data storage.
Reimplemented from FArchiveState.
Reimplemented in FArrayReader, FBufferWriter, FBulkDataWriter, FDuplicateDataReader, FDuplicateDataWriter, FObjectReader, FHttpStreamFArchive, FInMemoryReplayStreamArchive, FPreloadableArchive, FPreloadableArchiveProxy, FBufferReaderBase, FSkeletalMeshLODSizeCounter, FPackageReader, FNameTableArchiveReader, FArchiveFileWriterGeneric, FArchiveProxy, FLargeMemoryReader, FLargeMemoryWriter, TMemoryHasher< HashBuilder, HashDigest >, FMemoryReader, FMemoryReaderView, TMemoryWriterBase< ArrayAllocatorType >, FStaticMemoryReader, FExportArchive, FAsyncArchive, UE::Transaction::FSerializedObjectDataReader, UE::Transaction::Internal::FSerializedObjectDataWriterCommon, FSharedMemoryReader, FSharedMemoryWriter, FLocalFileStreamFArchive, FManifestWriter, FManifestReader, FSignedArchiveReader, FNonBufferingReadOnlyArchive, and FArchiveFileReaderGeneric.
|
inline |
Returns the global engine serialization version used for this archive.
|
staticprotected |
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
Reimplemented from FArchiveState.
Reimplemented in FArchiveProxy.
|
inline |
Returns true if tagged property serialization should be replaced by faster unversioned serialization. This assumes writer and reader share the same property definitions.
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.
| Guid | The guid of the custom version. This must have previously been registered with FCustomVersionRegistration. |
Reimplemented in FLinkerSave.
|
inline |
Returns true if this archive wants properties to be serialized in binary form instead of safer but slower tagged form.
Serializes an ANSICHAR value from or into an archive.
| Ar | The archive to serialize from or to. |
| Value | The value to serialize. |
Serializes a Boolean value from or into an archive.
| Ar | The archive to serialize from or to. |
| Value | The value to serialize. |
Serializes a double precision floating point value from or into an archive.
| Ar | The archive to serialize from or to. |
| Value | The value to serialize. |
Serializes a single precision floating point value from or into an archive.
| Ar | The archive to serialize from or to. |
| Value | The value to serialize. |
Serializes an FString value from or into an archive.
| Ar | The archive to serialize from or to. |
| Value | The value to serialize. |
Serializes a signed 16-bit integer value from or into an archive.
| Ar | The archive to serialize from or to. |
| Value | The value to serialize. |
Serializes a signed 32-bit integer value from or into an archive.
| Ar | The archive to serialize from or to. |
| Value | The value to serialize. |
Serializes a signed 64-bit integer value from or into an archive.
| Ar | The archive to serialize from or to. |
| Value | The value to serialize. |
Serializes a signed 8-bit integer value from or into an archive.
| Ar | The archive to serialize from or to. |
| Value | The value to serialize. |
Serializes an unsigned 16-bit integer value from or into an archive.
| Ar | The archive to serialize from or to. |
| Value | The value to serialize. |
Serializes an unsigned 32-bit integer value from or into an archive.
| Ar | The archive to serialize from or to. |
| Value | The value to serialize. |
Serializes a unsigned 64-bit integer value from or into an archive.
| Ar | The archive to serialize from or to. |
| Value | The value to serialize. |
Serializes an unsigned 8-bit integer value from or into an archive.
| Ar | The archive to serialize from or to. |
| Value | The value to serialize. |
Serializes a UTF32CHAR value from or into an archive.
| Ar | The archive to serialize from or to. |
| Value | The value to serialize. |
Serializes a WIDECHAR value from or into an archive.
| Ar | The archive to serialize from or to. |
| Value | The value to serialize. |
| FFastPathLoadBuffer* FArchiveState::ActiveFPLB |
| uint8 FArchiveState::ArAllowLazyLoading |
Whether to allow lazy loading of bulk/secondary data.
| uint8 FArchiveState::ArContainsCode |
Quickly tell if an archive contains script code.
| 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.
| 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.
| uint8 FArchiveState::ArIgnoreArchetypeRef |
If true, we will not serialize archetype references for structs and classes.
| uint8 FArchiveState::ArIgnoreClassGeneratedByRef |
If true, we will not serialize ClassGeneratedBy reference in UClass.
| uint8 FArchiveState::ArIgnoreClassRef |
If true, UObject::Serialize will skip serialization of the Class property.
| uint8 FArchiveState::ArIgnoreOuterRef |
If true, we will not serialize the Outer reference in UObject.
| uint8 FArchiveState::ArIsCountingMemory |
Whether this archive is counting memory.
| uint8 FArchiveState::ArIsFilterEditorOnly |
Whether editor only properties are being filtered from the archive (or has been filtered).
| uint8 FArchiveState::ArIsModifyingWeakAndStrongReferences |
Whether a reference collector is modifying the references and wants both weak and strong ones
| uint8 FArchiveState::ArIsNetArchive |
Whether or not this archive is sending/receiving network data
| uint8 FArchiveState::ArIsObjectReferenceCollector |
Whether this archive only cares about serializing object references.
| uint8 FArchiveState::ArIsSaveGame |
Whether this archive is saving/loading game state
| uint8 FArchiveState::ArIsSavingOptionalObject |
Whether we are currently serializing optional data
| int64 FArchiveState::ArMaxSerializeSize |
Max size of data that this archive is allowed to serialize.
| uint8 FArchiveState::ArMergeOverrides |
Set to false if OverriddenProperties should be cleared at the beginning of SerializeVersionedTaggedProperties.
| uint8 FArchiveState::ArNoDelta |
If true, do not perform delta serialization of properties.
| uint8 FArchiveState::ArNoIntraPropertyDelta |
If true, do not perform delta serialization within properties (e.g. TMaps and TSets).
| uint32 FArchiveState::ArPortFlags |
Modifier flags that be used when serializing UProperties
| uint8 FArchiveState::ArPreserveArrayElements |
Set TRUE to stop arrays from being cleared before they're loaded. Instead, array data will be merged
| int32 FArchiveState::ArSerializingDefaults |
Whether we are currently serializing defaults. > 0 means yes, <= 0 means no.
| uint8 FArchiveState::ArShouldSkipBulkData |
Whether bulk data serialization should be skipped or not.
| uint8 FArchiveState::ArUseCustomPropertyList |
Set TRUE to use the custom property list attribute for serialization.
| FFastPathLoadBuffer FArchiveState::InlineFPLB |