UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
BuildPatchServices::IChunkReferenceTracker Class Referenceabstract

#include <ChunkReferenceTracker.h>

+ Inheritance diagram for BuildPatchServices::IChunkReferenceTracker:

Public Types

enum class  ESortDirection : uint8 { Ascending = 0 , Descending }
 

Public Member Functions

virtual ~IChunkReferenceTracker ()
 
virtual TSet< FGuidGetReferencedChunks () const =0
 
virtual int32 GetReferenceCount (const FGuid &ChunkId) const =0
 
virtual void SortByUseOrder (TArray< FGuid > &ChunkList, ESortDirection Direction) const =0
 
virtual TArray< FGuidGetNextReferences (int32 Count, const TFunction< bool(const FGuid &)> &SelectPredicate) const =0
 
virtual TArray< FGuidSelectFromNextReferences (int32 Count, const TFunction< bool(const FGuid &)> &SelectPredicate) const =0
 
virtual bool PopReference (const FGuid &ChunkId)=0
 
virtual int32 GetRemainingChunkCount () const =0
 
virtual void CopyOutOrderedUseList (TArray< FGuid > &OutUseList) const =0
 
virtual int32 GetNextUsageForChunk (const FGuid &ChunkId, int32 &OutLastUsageIndex) const =0
 
virtual int32 GetCurrentUsageIndex () const =0
 

Detailed Description

An interface for tracking references to chunks used throughout an installation. It is used to share across systems the chunks that are still required and when.

Member Enumeration Documentation

◆ ESortDirection

Enumerator
Ascending 
Descending 

Constructor & Destructor Documentation

◆ ~IChunkReferenceTracker()

virtual BuildPatchServices::IChunkReferenceTracker::~IChunkReferenceTracker ( )
inlinevirtual

Member Function Documentation

◆ CopyOutOrderedUseList()

virtual void BuildPatchServices::IChunkReferenceTracker::CopyOutOrderedUseList ( TArray< FGuid > &  OutUseList) const
pure virtual

◆ GetCurrentUsageIndex()

virtual int32 BuildPatchServices::IChunkReferenceTracker::GetCurrentUsageIndex ( ) const
pure virtual

◆ GetNextReferences()

virtual TArray< FGuid > BuildPatchServices::IChunkReferenceTracker::GetNextReferences ( int32  Count,
const TFunction< bool(const FGuid &)> &  SelectPredicate 
) const
pure virtual

Find the next X chunk references that match the provided predicate.

Parameters
CountThe number of chunk entries that are desired.
SelectPredicateThe predicate used to select each chunk.
Returns
an array of unique chunk id entries, in the order in which they are required.

Implemented in BuildPatchServices::FChunkReferenceTracker.

◆ GetNextUsageForChunk()

virtual int32 BuildPatchServices::IChunkReferenceTracker::GetNextUsageForChunk ( const FGuid ChunkId,
int32 OutLastUsageIndex 
) const
pure virtual

◆ GetReferenceCount()

virtual int32 BuildPatchServices::IChunkReferenceTracker::GetReferenceCount ( const FGuid ChunkId) const
pure virtual

Gets the number of times a specific chunk is still referenced for the associated installation.

Parameters
ChunkIdThe id for the chunk in question.
Returns
the number of references remaining.

Implemented in BuildPatchServices::FChunkReferenceTracker.

◆ GetReferencedChunks()

virtual TSet< FGuid > BuildPatchServices::IChunkReferenceTracker::GetReferencedChunks ( ) const
pure virtual

Gets a set of all chunks referenced by the installation this tracker refers to. This returns the remaining referenced chunks!

Returns
set of GUID containing every chunk used.

Implemented in BuildPatchServices::FChunkReferenceTracker.

◆ GetRemainingChunkCount()

virtual int32 BuildPatchServices::IChunkReferenceTracker::GetRemainingChunkCount ( ) const
pure virtual

◆ PopReference()

virtual bool BuildPatchServices::IChunkReferenceTracker::PopReference ( const FGuid ChunkId)
pure virtual

Poorly named - Should be named "DoneWithChunk". The expectation is that we finish with chunks in the expected use order.

Pop the top reference from the tracker, indicating that operation has been performed. It is not valid to pop anything but the top guid, so it must be provided for verification of behavior.

Parameters
ChunkIdThe id of the top chunk, this is used to verify behavior.
Returns
true if the correct guid was provided and the reference was popped, false if the wrong guid was provided and thus no change was made.

Implemented in BuildPatchServices::FChunkReferenceTracker.

◆ SelectFromNextReferences()

virtual TArray< FGuid > BuildPatchServices::IChunkReferenceTracker::SelectFromNextReferences ( int32  Count,
const TFunction< bool(const FGuid &)> &  SelectPredicate 
) const
pure virtual

Select from the next X chunk references, entries that match the provided predicate.

Parameters
CountThe number of chunk entries to search through.
SelectPredicateThe predicate used to select each chunk.
Returns
an array of unique chunk id entries, in the order in which they are required.

Implemented in BuildPatchServices::FChunkReferenceTracker.

◆ SortByUseOrder()

virtual void BuildPatchServices::IChunkReferenceTracker::SortByUseOrder ( TArray< FGuid > &  ChunkList,
ESortDirection  Direction 
) const
pure virtual

Sorts a given array of chunk ids by the order in which they are required for the installation.

Parameters
ChunkListThe array to be sorted.
DirectionThe direction of sort. Ascending places soonest required chunk first.

Implemented in BuildPatchServices::FChunkReferenceTracker.


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