Ark Server API (ASA) - Wiki
|
#include <Archive.h>
Classes | |
class | FScopeSeekTo |
class | FScopeSetDebugSerializationFlags |
Protected Member Functions | |
void | SetShouldSkipCompilingAssets (bool Enabled) |
Static Protected Member Functions | |
static void | LinkProxy (FArchiveState &Inner, FArchiveState &Proxy) |
static void | UnlinkProxy (FArchiveState &Inner, FArchiveState &Proxy) |
Additional Inherited Members | |
Static Private Member Functions inherited from FArchiveState | |
static void | LinkProxy (FArchiveState &Inner, FArchiveState &Proxy) |
static void | UnlinkProxy (FArchiveState &Inner, FArchiveState &Proxy) |
Base class for archives that can be used for loading, saving, and garbage collecting in a byte order neutral way.
|
default |
|
default |
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, FBufferReaderBase, and FArchiveProxy.
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.
Definition at line 1633 of file Archive.h.
|
inlinevirtual |
Adds external read dependency
Reimplemented in FArchiveProxy.
Definition at line 1946 of file Archive.h.
|
inline |
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, FArchiveFileReaderGeneric, and FArchiveFileWriterGeneric.
Definition at line 1719 of file Archive.h.
|
inline |
|
inline |
|
inline |
Called to get the computed size from a size-detecting archive after it has finished serializing.
Reimplemented from FArchiveState.
Reimplemented in FArchiveProxy.
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.
Definition at line 1642 of file Archive.h.
|
inline |
|
inline |
uint32 FArchiveState::EngineNetVer | ( | ) | const |
Returns the engine-global network protocol version for this archive.
|
inline |
|
inline |
Attempts to finish writing any buffered data to disk/permanent storage.
Reimplemented in FAsyncWriter, FArchiveSaveCompressedProxy, FArchiveProxy, and FArchiveFileWriterGeneric.
Definition at line 1714 of file Archive.h.
Flushes cache and frees internal data.
Reimplemented in FArchiveProxy, and FArchiveFileReaderGeneric.
Definition at line 1694 of file Archive.h.
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.
Definition at line 1281 of file Archive.h.
|
inline |
uint32 FArchiveState::GameNetVer | ( | ) | const |
Returns the game-specific network protocol version for this archive.
Called to retrieve the archetype from the event driven loader. If this returns null, then call GetArchetype yourself.
Reimplemented from FArchiveState.
Reimplemented in FArchiveProxy.
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, FPreloadableArchive, FPreloadableArchiveProxy, FArchiveFileReaderGeneric, FArchiveFileWriterGeneric, FArchiveProxy, FLargeMemoryReader, FLargeMemoryWriter, TMemoryHasher< HashBuilder, HashDigest >, FMemoryReader, FMemoryReaderView, TMemoryWriter< IndexSize >, TMemoryWriter< 32 >, TMemoryWriter< 64 >, and FStaticMemoryReader.
|
inline |
|
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 FArchiveProxy.
Definition at line 1857 of file Archive.h.
|
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 FArchiveProxy.
|
inline |
|
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 FArchiveProxy.
|
inline |
|
inline |
|
inlinevirtual |
Gets the current UObject serialization context for this archive.
Reimplemented from FArchiveState.
|
inline |
|
inline |
void FArchiveState::GetSerializedPropertyChain | ( | TArray< struct FProperty * > & | OutProperties | ) | const |
Gets the chain of properties that are currently being serialized
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
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.
Definition at line 1666 of file Archive.h.
|
inline |
|
inline |
|
inline |
|
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 |
|
inline |
|
staticprotected |
Called when an object stops serializing property data using script serialization.
Reimplemented in FArchiveProxy.
Definition at line 1811 of file Archive.h.
Called when an object begins serializing property data using script serialization.
Reimplemented in FArchiveProxy.
Definition at line 1806 of file Archive.h.
|
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.
Definition at line 1816 of file Archive.h.
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 FArchiveMD5, FMemoryArchive, and FArchiveProxy.
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, FArchiveMD5, FNameAsStringIndexProxyArchive, FArchiveMD5, FMemoryArchive, 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, and FArchiveProxy.
|
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 FArchiveProxy, FArchiveMD5, and FMemoryArchive.
|
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 FArchiveProxy, FArchiveMD5, and FMemoryArchive.
|
virtual |
Serializes soft object paths from or into this archive.
Value | Soft object path to serialize. |
Reimplemented in FArchiveProxy, FArchiveMD5, and FMemoryArchive.
|
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, FArchiveMD5, and FMemoryArchive.
|
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 FArchiveProxy, FArchiveMD5, and FMemoryArchive.
|
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 FMemoryArchive, FArchiveMD5, FArchiveMD5, FMemoryArchive, and FArchiveProxy.
|
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.
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 FArchiveFileReaderGeneric, and FArchiveProxy.
Definition at line 1686 of file Archive.h.
Tells the archive to attempt to preload the specified object so data can be loaded out of it.
Reimplemented in FArchiveProxy.
Definition at line 1599 of file Archive.h.
|
inlinevirtual |
|
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.
|
inline |
Resets all of the base archive members.
Reimplemented from FArchiveState.
Reimplemented in FBitWriter.
Resets the custom version numbers for this archive.
Reimplemented from FArchiveState.
Reimplemented in 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, FPreloadableArchive, FPreloadableArchiveProxy, FBufferReaderBase, FMemoryArchive, FArchiveProxy, FArchiveFileReaderGeneric, and FArchiveFileWriterGeneric.
Definition at line 1625 of file Archive.h.
Reimplemented in FArchiveLoadCompressedProxy, FArchiveSaveCompressedProxy, FArrayReader, FBufferWriter, FMemoryReader, FMemoryReaderView, FStaticMemoryReader, FBufferReaderBase, FArchiveMD5, TMemoryHasher< HashBuilder, HashDigest >, TMemoryWriter< IndexSize >, TMemoryWriter< 32 >, TMemoryWriter< 64 >, FBitReader, FAsyncWriter, FLargeMemoryWriter, FLargeMemoryReader, FBitWriter, FPreloadableArchive, FPreloadableArchiveProxy, FOutputDeviceMemory::FOutputDeviceMemoryProxyArchive, FArchiveProxy, FArchiveFileReaderGeneric, and FArchiveFileWriterGeneric.
Definition at line 1569 of file Archive.h.
Reimplemented in FArchiveProxy, FBitReader, and FBitWriter.
Definition at line 1580 of file Archive.h.
|
inlinevirtual |
Serialize bulk data.
BulkData | Bulk data object to serialize |
Params | Serialization parameters |
Reimplemented in FArchiveProxy.
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, FArchiveProxy, and FBitWriter.
Definition at line 1590 of file Archive.h.
Packs int value into bytes of 7 bits with 8th bit for 'more'
Reimplemented in FArchiveProxy, FBitReader, and FBitWriter.
void FArchiveState::SetArchiveState | ( | const FArchiveState & | InState | ) |
Modifies current archive state, can be used to override flags.
|
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.
|
inline |
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 FArchiveProxy.
Sets the archive engine network version.
Reimplemented from FArchiveState.
|
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 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 the archive game network version.
Reimplemented from FArchiveState.
Sets whether this archive is for loading data.
bInIsLoading | true if this archive is for loading, false otherwise. |
Reimplemented from FArchiveState.
|
virtual |
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.
|
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.
|
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.
|
inline |
|
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.
|
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.
|
virtual |
Sets whether this archive wants binary property serialization.
bInWantBinaryPropertySerialization | true if this archive wants binary serialization, false otherwise. |
Reimplemented from FArchiveState.
|
inline |
|
inline |
Checks whether the archive wants to skip the property independent of the other flags
Reimplemented from FArchiveState.
Reimplemented in FArchiveProxy.
|
inline |
|
inline |
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, FPreloadableArchive, FPreloadableArchiveProxy, FBufferReaderBase, FMemoryArchive, FArchiveProxy, FArchiveFileReaderGeneric, and FArchiveFileWriterGeneric.
|
inline |
|
inline |
|
inline |
Returns total size of the backing data storage.
Reimplemented from FArchiveState.
Reimplemented in FArrayReader, FBufferWriter, FPreloadableArchive, FPreloadableArchiveProxy, FBufferReaderBase, FArchiveFileWriterGeneric, FArchiveProxy, FLargeMemoryReader, FLargeMemoryWriter, TMemoryHasher< HashBuilder, HashDigest >, FMemoryReader, FMemoryReaderView, TMemoryWriter< IndexSize >, TMemoryWriter< 32 >, TMemoryWriter< 64 >, FStaticMemoryReader, and FArchiveFileReaderGeneric.
|
inline |
|
inline |
|
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 |
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. |
|
inline |
|
friend |
Serializes an FIntRect 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 the string.
Ar | Reference to the serialization archive. |
S | Reference to the string being serialized. |
Definition at line 1363 of file String.cpp.
FFastPathLoadBuffer* FArchiveState::ActiveFPLB |
uint8 FArchiveState::ArAllowLazyLoading |
uint8 FArchiveState::ArContainsCode |
uint8 FArchiveState::ArContainsMap |
const struct FCustomPropertyListNode* FArchiveState::ArCustomPropertyList |
|
private |
|
private |
uint8 FArchiveState::ArForceByteSwapping |
|
private |
|
private |
uint8 FArchiveState::ArIgnoreArchetypeRef |
uint8 FArchiveState::ArIgnoreClassGeneratedByRef |
uint8 FArchiveState::ArIgnoreClassRef |
If true, UObject::Serialize will skip serialization of the Class property.
uint8 FArchiveState::ArIgnoreOuterRef |
uint8 FArchiveState::ArIsCountingMemory |
uint8 FArchiveState::ArIsFilterEditorOnly |
|
private |
|
private |
uint8 FArchiveState::ArIsModifyingWeakAndStrongReferences |
uint8 FArchiveState::ArIsNetArchive |
uint8 FArchiveState::ArIsObjectReferenceCollector |
|
private |
uint8 FArchiveState::ArIsSaveGame |
|
private |
|
private |
Whether this archive serializes to a text format. Text format archives should use high level constructs from FStructuredArchive for delimiting data rather than manually seeking through the file.
|
private |
|
private |
int64 FArchiveState::ArMaxSerializeSize |
uint8 FArchiveState::ArNoDelta |
uint8 FArchiveState::ArNoIntraPropertyDelta |
uint32 FArchiveState::ArPortFlags |
uint8 FArchiveState::ArRequiresLocalizationGather |
int32 FArchiveState::ArSerializingDefaults |
uint8 FArchiveState::ArShouldSkipBulkData |
|
private |
uint8 FArchiveState::ArUseCustomPropertyList |
|
private |
|
private |
|
mutableprivate |
|
mutableprivate |
All the custom versions stored in the archive. Stored as a pointer to a heap-allocated object because of a 3-way dependency between TArray, FCustomVersionContainer and FArchive, which is too much work to change right now. Keeping it as a heap-allocated object also helps with performance in some cases as we don't need to construct it for archives that don't care about custom versions.
FFastPathLoadBuffer FArchiveState::InlineFPLB |
|
private |
|
private |