Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
FMemoryArchive Class Reference

#include <MemoryArchive.h>

+ Inheritance diagram for FMemoryArchive:
+ Collaboration diagram for FMemoryArchive:

Public Member Functions

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

Protected Member Functions

 FMemoryArchive ()
 
- Protected Member Functions inherited from FArchive
void SetShouldSkipCompilingAssets (bool Enabled)
 

Protected Attributes

int64 Offset
 

Friends

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

Additional Inherited Members

- Public Attributes inherited from FArchive
FFastPathLoadBufferActiveFPLB
 
FFastPathLoadBuffer InlineFPLB
 
uint8 ArContainsCode: 1
 
uint8 ArContainsMap: 1
 
uint8 ArRequiresLocalizationGather: 1
 
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 ArIsSaveGame: 1
 
uint8 ArIsNetArchive: 1
 
uint8 ArUseCustomPropertyList: 1
 
int32 ArSerializingDefaults
 
uint32 ArPortFlags
 
int64 ArMaxSerializeSize
 
const struct FCustomPropertyListNodeArCustomPropertyList
 
- Static Protected Member Functions inherited from FArchive
static void LinkProxy (FArchiveState &Inner, FArchiveState &Proxy)
 
static void UnlinkProxy (FArchiveState &Inner, FArchiveState &Proxy)
 

Detailed Description

Base class for serializing arbitrary data in memory.

Definition at line 14 of file MemoryArchive.h.

Constructor & Destructor Documentation

◆ FMemoryArchive()

FMemoryArchive::FMemoryArchive ( )
inlineprotected

Marked as protected to avoid instantiating this class directly

Definition at line 63 of file MemoryArchive.h.

+ Here is the call graph for this function:

Member Function Documentation

◆ GetArchiveName()

virtual FString FMemoryArchive::GetArchiveName ( ) const
inlinevirtual

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

Reimplemented in FArrayReader, TBufferArchive< IndexSize >, TBufferArchive< 32 >, TBufferArchive< 64 >, FLargeMemoryReader, FLargeMemoryWriter, TMemoryHasher< HashBuilder, HashDigest >, FMemoryReader, FMemoryReaderView, TMemoryWriter< IndexSize >, TMemoryWriter< 32 >, TMemoryWriter< 64 >, and FStaticMemoryReader.

Definition at line 23 of file MemoryArchive.h.

◆ operator<<() [1/12]

virtual FArchive & FMemoryArchive::operator<< ( class FName & Value)
inlineoverridevirtual

Serializes an FName value from or into this archive.

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

Parameters
ValueThe value to serialize.
Returns
This instance.

Reimplemented from FArchive.

Definition at line 36 of file MemoryArchive.h.

+ Here is the call graph for this function:

◆ operator<<() [2/12]

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 from FArchive.

Definition at line 1181 of file Archive.h.

◆ operator<<() [3/12]

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

Serializes an FName value from or into this archive.

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

Parameters
ValueThe value to serialize.
Returns
This instance.

Reimplemented from FArchive.

Definition at line 1147 of file Archive.h.

◆ operator<<() [4/12]

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

Serializes an FText value from or into an archive.

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

Reimplemented from FArchive.

◆ operator<<() [5/12]

virtual FArchive & FArchive::operator<< ( struct FLazyObjectPtr & Value)
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.

Parameters
ValueThe value to serialize.
Returns
This instance.

Reimplemented from FArchive.

◆ operator<<() [6/12]

virtual FArchive & FArchive::operator<< ( struct FObjectPtr & Value)
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.

Parameters
ValueThe value to serialize.
Returns
This instance.

Reimplemented from FArchive.

◆ operator<<() [7/12]

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

Serializes soft object paths from or into this archive.

Parameters
ValueSoft object path to serialize.
Returns
This instance.

Reimplemented from FArchive.

◆ operator<<() [8/12]

virtual FArchive & FArchive::operator<< ( struct FSoftObjectPtr & Value)
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.

Parameters
ValueThe asset pointer to serialize.
Returns
This instance.

Reimplemented from FArchive.

◆ operator<<() [9/12]

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

Serializes FWeakObjectPtr value from or into this archive.

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

Parameters
ValueThe value to serialize.
Returns
This instance.

Reimplemented from FArchive.

◆ operator<<() [10/12]

virtual FArchive & FMemoryArchive::operator<< ( struct UObject *& Value)
inlineoverridevirtual

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 from FArchive.

Definition at line 53 of file MemoryArchive.h.

◆ operator<<() [11/12]

template<class T >
FORCEINLINE 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.

Definition at line 1193 of file Archive.h.

◆ operator<<() [12/12]

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 from FArchive.

Definition at line 1168 of file Archive.h.

◆ Seek()

void FMemoryArchive::Seek ( int64 InPos)
inlinefinalvirtual

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

Reimplemented from FArchive.

Definition at line 25 of file MemoryArchive.h.

◆ Tell()

int64 FMemoryArchive::Tell ( )
inlinefinalvirtual

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

Definition at line 29 of file MemoryArchive.h.

Friends And Related Symbol Documentation

◆ operator<< [1/15]

FORCEINLINE friend 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.

Definition at line 1290 of file Archive.h.

◆ operator<< [2/15]

FORCEINLINE friend 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.

Definition at line 1419 of file Archive.h.

◆ operator<< [3/15]

FORCEINLINE friend 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.

Definition at line 1506 of file Archive.h.

◆ operator<< [4/15]

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

Serializes an FIntRect value from or into an archive.

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

◆ operator<< [5/15]

FORCEINLINE friend 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.

Definition at line 1488 of file Archive.h.

◆ operator<< [6/15]

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.

Serializes the string.

Parameters
ArReference to the serialization archive.
SReference to the string being serialized.
Returns
Reference to the Archive after serialization.

Definition at line 1566 of file String.cpp.

◆ operator<< [7/15]

FORCEINLINE friend 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.

Definition at line 1375 of file Archive.h.

◆ operator<< [8/15]

FORCEINLINE friend 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.

Definition at line 1452 of file Archive.h.

◆ operator<< [9/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.

Definition at line 1541 of file Archive.h.

◆ operator<< [10/15]

FORCEINLINE friend 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.

Definition at line 1341 of file Archive.h.

◆ operator<< [11/15]

FORCEINLINE friend 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.

Definition at line 1358 of file Archive.h.

◆ operator<< [12/15]

FORCEINLINE friend 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.

Definition at line 1392 of file Archive.h.

◆ operator<< [13/15]

FORCEINLINE friend 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.

Definition at line 1524 of file Archive.h.

◆ operator<< [14/15]

FORCEINLINE friend 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.

Definition at line 1324 of file Archive.h.

◆ operator<< [15/15]

FORCEINLINE friend 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.

Definition at line 1307 of file Archive.h.

Member Data Documentation

◆ Offset

int64 FMemoryArchive::Offset
protected

Definition at line 68 of file MemoryArchive.h.


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