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

#include <PackageWriter.h>

+ Inheritance diagram for IPackageWriter:

Classes

struct  FAdditionalFileInfo
 
struct  FBeginPackageInfo
 
struct  FBulkDataInfo
 
struct  FCapabilities
 
struct  FCommitAttachmentInfo
 
struct  FCommitPackageInfo
 
struct  FLinkerAdditionalDataInfo
 
struct  FPackageInfo
 
struct  FPackageTrailerInfo
 

Public Types

enum class  EWriteOptions {
  None = 0 , WritePackage = 0x01 , WriteSidecars = 0x02 , Write = WritePackage | WriteSidecars ,
  ComputeHash = 0x04 , SaveForDiff = 0x08
}
 
enum class  ECommitStatus { Success , Canceled , Error }
 

Public Member Functions

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
 
virtual ICookedPackageWriterAsCookedPackageWriter ()
 

Detailed Description

Interface for SavePackage to write packages to storage.

Definition at line 29 of file PackageWriter.h.

Member Enumeration Documentation

◆ ECommitStatus

Enumerator
Success 
Canceled 
Error 

Definition at line 81 of file PackageWriter.h.

◆ EWriteOptions

Enumerator
None 
WritePackage 
WriteSidecars 
Write 
ComputeHash 
SaveForDiff 

Definition at line 72 of file PackageWriter.h.

Constructor & Destructor Documentation

◆ ~IPackageWriter()

virtual IPackageWriter::~IPackageWriter ( )
virtualdefault

Member Function Documentation

◆ AsCookedPackageWriter()

virtual ICookedPackageWriter * IPackageWriter::AsCookedPackageWriter ( )
inlinevirtual

Downcast function for IPackageWriters that implement the ICookedPackageWriters inherited interface.

Reimplemented in ICookedPackageWriter.

Definition at line 188 of file PackageWriter.h.

◆ BeginPackage()

virtual void IPackageWriter::BeginPackage ( const FBeginPackageInfo & Info)
pure virtual

Mark the beginning of a package store transaction for the specified package

This must be called before any data is produced for a given package

◆ CommitPackage()

virtual void IPackageWriter::CommitPackage ( FCommitPackageInfo && Info)
pure virtual

Finalize a package started with BeginPackage()

◆ CreateLinkerArchive()

virtual COREUOBJECT_API TUniquePtr< FLargeMemoryWriter > IPackageWriter::CreateLinkerArchive ( FName PackageName,
UObject * Asset )
virtual

Create the FLargeMemoryWriter to which the Header and Exports are written during the save.

◆ CreateLinkerExportsArchive()

virtual COREUOBJECT_API TUniquePtr< FLargeMemoryWriter > IPackageWriter::CreateLinkerExportsArchive ( FName PackageName,
UObject * Asset )
virtual

Returns an archive to be used when serializing exports.

◆ GetCapabilities()

virtual FCapabilities IPackageWriter::GetCapabilities ( ) const
inlinevirtual

Return capabilities/settings this PackageWriter has/requires

Definition at line 49 of file PackageWriter.h.

◆ GetExportsFooterSize()

virtual int64 IPackageWriter::GetExportsFooterSize ( )
inlinevirtual

Report the size of the Footer that is added after Exports and BulkData but before the PackageTrailer

Definition at line 162 of file PackageWriter.h.

◆ IsPreSaveCompleted()

virtual bool IPackageWriter::IsPreSaveCompleted ( ) const
inlinevirtual

Report whether PreSave was already called by the PackageWriter before the current UPackage::Save call.

Definition at line 182 of file PackageWriter.h.

◆ WriteAdditionalFile()

virtual void IPackageWriter::WriteAdditionalFile ( const FAdditionalFileInfo & Info,
const FIoBuffer & FileData )
pure virtual

Write separate files written by UObjects during cooking via UObject::CookAdditionalFiles.

◆ WriteBulkData()

virtual void IPackageWriter::WriteBulkData ( const FBulkDataInfo & Info,
const FIoBuffer & BulkData,
const TArray< FFileRegion > & FileRegions )
pure virtual

Write bulk data for the current package

◆ WriteLinkerAdditionalData()

virtual void IPackageWriter::WriteLinkerAdditionalData ( const FLinkerAdditionalDataInfo & Info,
const FIoBuffer & Data,
const TArray< FFileRegion > & FileRegions )
pure virtual

Write separate data written by UObjects via FLinkerSave::AdditionalDataToAppend.

◆ WritePackageData()

virtual void IPackageWriter::WritePackageData ( const FPackageInfo & Info,
FLargeMemoryWriter & ExportsArchive,
const TArray< FFileRegion > & FileRegions )
pure virtual

Write package data (exports and serialized header)

This may only be called after a BeginPackage() call has been made to signal the start of a package store transaction

◆ WritePackageTrailer()

virtual void IPackageWriter::WritePackageTrailer ( const FPackageTrailerInfo & Info,
const FIoBuffer & Data )
pure virtual

Write the PackageTrailer, a separate segment for some bulkdata that is written the end of the file.


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