Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
ICookedPackageWriter Class Referenceabstract

#include <PackageWriter.h>

+ Inheritance diagram for ICookedPackageWriter:
+ Collaboration diagram for ICookedPackageWriter:

Classes

struct  FCookCapabilities
 
struct  FCookedPackageInfo
 
struct  FCookInfo
 
struct  FPreviousCookedBytesData
 

Public Member Functions

virtual ~ICookedPackageWriter ()=default
 
virtual FCookCapabilities GetCookCapabilities () const
 
virtual FDateTime GetPreviousCookTime () const
 
virtual ICookedPackageWriterAsCookedPackageWriter () override
 
virtual void Initialize (const FCookInfo &Info)=0
 
virtual void BeginCook (const FCookInfo &Info)=0
 
virtual void EndCook (const FCookInfo &Info)=0
 
virtual TUniquePtr< FAssetRegistryStateLoadPreviousAssetRegistry ()=0
 
virtual FCbObject GetOplogAttachment (FName PackageName, FUtf8StringView AttachmentKey)=0
 
virtual void RemoveCookedPackages (TArrayView< const FName > PackageNamesToRemove)=0
 
virtual void RemoveCookedPackages ()=0
 
virtual void MarkPackagesUpToDate (TArrayView< const FName > UpToDatePackages)=0
 
virtual bool GetPreviousCookedBytes (const FPackageInfo &Info, FPreviousCookedBytesData &OutData)
 
virtual void CompleteExportsArchiveForDiff (const FPackageInfo &Info, FLargeMemoryWriter &ExportsArchive)
 
virtual void UpdateSaveArguments (FSavePackageArgs &SaveArgs)
 
virtual bool IsAnotherSaveNeeded (FSavePackageResultStruct &PreviousResult, FSavePackageArgs &SaveArgs)
 
virtual TFuture< FCbObjectWriteMPCookMessageForPackage (FName PackageName)=0
 
virtual bool TryReadMPCookMessageForPackage (FName PackageName, FCbObjectView Message)=0
 
virtual IPackageStoreWriterAsPackageStoreWriter ()
 
virtual TMap< FName, TRefCountPtr< FPackageHashes > > & GetPackageHashes ()=0
 
- Public Member Functions inherited from IPackageWriter
virtual ~IPackageWriter ()=default
 
virtual FCapabilities GetCapabilities () const
 
virtual void BeginPackage (const FBeginPackageInfo &Info)=0
 
virtual void CommitPackage (FCommitPackageInfo &&Info)=0
 
virtual void WritePackageData (const FPackageInfo &Info, FLargeMemoryWriter &ExportsArchive, const TArray< FFileRegion > &FileRegions)=0
 
virtual void WriteBulkData (const FBulkDataInfo &Info, const FIoBuffer &BulkData, const TArray< FFileRegion > &FileRegions)=0
 
virtual void WriteAdditionalFile (const FAdditionalFileInfo &Info, const FIoBuffer &FileData)=0
 
virtual void WriteLinkerAdditionalData (const FLinkerAdditionalDataInfo &Info, const FIoBuffer &Data, const TArray< FFileRegion > &FileRegions)=0
 
virtual int64 GetExportsFooterSize ()
 
virtual void WritePackageTrailer (const FPackageTrailerInfo &Info, const FIoBuffer &Data)=0
 
virtual COREUOBJECT_API TUniquePtr< FLargeMemoryWriterCreateLinkerArchive (FName PackageName, UObject *Asset)
 
virtual COREUOBJECT_API TUniquePtr< FLargeMemoryWriterCreateLinkerExportsArchive (FName PackageName, UObject *Asset)
 
virtual bool IsPreSaveCompleted () const
 

Additional Inherited Members

- Public Types inherited from IPackageWriter
enum class  EWriteOptions {
  None = 0 , WritePackage = 0x01 , WriteSidecars = 0x02 , Write = WritePackage | WriteSidecars ,
  ComputeHash = 0x04 , SaveForDiff = 0x08
}
 
enum class  ECommitStatus { Success , Canceled , Error }
 

Detailed Description

Interface for cooking that writes cooked packages to storage usable by the runtime game.

Definition at line 214 of file PackageWriter.h.

Constructor & Destructor Documentation

◆ ~ICookedPackageWriter()

virtual ICookedPackageWriter::~ICookedPackageWriter ( )
virtualdefault

Member Function Documentation

◆ AsCookedPackageWriter()

virtual ICookedPackageWriter * ICookedPackageWriter::AsCookedPackageWriter ( )
inlineoverridevirtual

Downcast function for IPackageWriters that implement the ICookedPackageWriters inherited interface.

Reimplemented from IPackageWriter.

Definition at line 238 of file PackageWriter.h.

◆ AsPackageStoreWriter()

virtual IPackageStoreWriter * ICookedPackageWriter::AsPackageStoreWriter ( )
inlinevirtual

Downcast function for ICookedPackageWriters that implement the IPackageStoreWriter inherited interface.

Definition at line 349 of file PackageWriter.h.

◆ BeginCook()

virtual void ICookedPackageWriter::BeginCook ( const FCookInfo & Info)
pure virtual

Signal the start of a cooking pass

Package data may only be produced after BeginCook() has been called and before EndCook() is called

◆ CompleteExportsArchiveForDiff()

virtual void ICookedPackageWriter::CompleteExportsArchiveForDiff ( const FPackageInfo & Info,
FLargeMemoryWriter & ExportsArchive )
inlinevirtual

Append all data to the Exports archive that would normally be done in CommitPackage, used for diffing.

Definition at line 323 of file PackageWriter.h.

◆ EndCook()

virtual void ICookedPackageWriter::EndCook ( const FCookInfo & Info)
pure virtual

Signal the end of a cooking pass.

◆ GetCookCapabilities()

virtual FCookCapabilities ICookedPackageWriter::GetCookCapabilities ( ) const
inlinevirtual

Return cook capabilities/settings this PackageWriter has/requires

Definition at line 227 of file PackageWriter.h.

◆ GetOplogAttachment()

virtual FCbObject ICookedPackageWriter::GetOplogAttachment ( FName PackageName,
FUtf8StringView AttachmentKey )
pure virtual

Returns an Attachment that was previously commited for the given PackageName. Returns an empty object if not found.

◆ GetPackageHashes()

virtual TMap< FName, TRefCountPtr< FPackageHashes > > & ICookedPackageWriter::GetPackageHashes ( )
pure virtual

Cooked package writers asynchronously hash the chunks for each package after CommitPackage. Once cooking has completed, use this to acquire the results. This is synced using void UPackage::WaitForAsyncFileWrites() - do not access the results before that completes. Non-const so that the cooking process can Move the map of hashes.

◆ GetPreviousCookedBytes()

virtual bool ICookedPackageWriter::GetPreviousCookedBytes ( const FPackageInfo & Info,
FPreviousCookedBytesData & OutData )
inlinevirtual

Load the bytes of the previously-cooked package, used for diffing

Definition at line 316 of file PackageWriter.h.

◆ GetPreviousCookTime()

virtual FDateTime ICookedPackageWriter::GetPreviousCookTime ( ) const
inlinevirtual

Return the timestamp of the previous cook, or FDateTime::MaxValue to indicate previous cook should be assumed newer than any other cook data.

Definition at line 233 of file PackageWriter.h.

+ Here is the call graph for this function:

◆ Initialize()

virtual void ICookedPackageWriter::Initialize ( const FCookInfo & Info)
pure virtual

Delete outdated cooked data, etc.

◆ IsAnotherSaveNeeded()

virtual bool ICookedPackageWriter::IsAnotherSaveNeeded ( FSavePackageResultStruct & PreviousResult,
FSavePackageArgs & SaveArgs )
inlinevirtual

Report whether an additional save is needed and set up for it if so. Used for diffing.

Definition at line 333 of file PackageWriter.h.

◆ LoadPreviousAssetRegistry()

virtual TUniquePtr< FAssetRegistryState > ICookedPackageWriter::LoadPreviousAssetRegistry ( )
pure virtual

Returns an AssetRegistry describing the previous cook results. This doesn't mean a cook saved off to another directory - it means the AssetRegistry that's living in the directory we are about to cook in to.

◆ MarkPackagesUpToDate()

virtual void ICookedPackageWriter::MarkPackagesUpToDate ( TArrayView< const FName > UpToDatePackages)
pure virtual

Signal the given cooked package(s) have been checked for changes and have not been modified since the last cook.

◆ RemoveCookedPackages() [1/2]

virtual void ICookedPackageWriter::RemoveCookedPackages ( )
pure virtual

Remove all cooked packages from storage.

◆ RemoveCookedPackages() [2/2]

virtual void ICookedPackageWriter::RemoveCookedPackages ( TArrayView< const FName > PackageNamesToRemove)
pure virtual

Remove the given cooked package(s) from storage; they have been modified since the last cook.

◆ TryReadMPCookMessageForPackage()

virtual bool ICookedPackageWriter::TryReadMPCookMessageForPackage ( FName PackageName,
FCbObjectView Message )
pure virtual

Read PackageData written by WriteMPCookMessageForPackage on a CookWorker. Called only on CookDirector.

◆ UpdateSaveArguments()

virtual void ICookedPackageWriter::UpdateSaveArguments ( FSavePackageArgs & SaveArgs)
inlinevirtual

Modify the SaveArgs if required before the first Save. Used for diffing.

Definition at line 329 of file PackageWriter.h.

◆ WriteMPCookMessageForPackage()

virtual TFuture< FCbObject > ICookedPackageWriter::WriteMPCookMessageForPackage ( FName PackageName)
pure virtual

Asynchronously create a CompactBinary Object message that replicates all of the package data from package save that is collected in memory and written at end of cook rather than being written to disk during package save. Used during MPCook to transfer this information from CookWorker to CookDirector. Called after CommitPackage, and only on CookWorkers.


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