|
| | FRefCountVector ()=default |
| |
| | FRefCountVector (const FRefCountVector &)=default |
| |
| | FRefCountVector (FRefCountVector &&From) |
| |
| FRefCountVector & | operator= (const FRefCountVector &)=default |
| |
| FRefCountVector & | operator= (FRefCountVector &&From) |
| |
| bool | IsEmpty () const |
| |
| size_t | GetCount () const |
| |
| size_t | GetMaxIndex () const |
| |
| bool | IsDense () const |
| |
| bool | IsValid (int Index) const |
| |
| bool | IsValidUnsafe (int Index) const |
| |
| int | GetRefCount (int Index) const |
| |
| int | GetRawRefCount (int Index) const |
| |
| void | Append (const FRefCountVector &Other) |
| |
| int | Allocate () |
| |
| int | Increment (int Index, unsigned short IncrementCount=1) |
| |
| void | Decrement (int Index, unsigned short DecrementCount=1) |
| |
| bool | AllocateAt (int Index) |
| |
| bool | AllocateAtUnsafe (int Index) |
| |
| const TDynamicVector< unsigned short > & | GetRawRefCounts () const |
| |
| TDynamicVector< unsigned short > & | GetRawRefCountsUnsafe () |
| |
| void | SetRefCountUnsafe (int Index, unsigned short ToCount) |
| |
| template<typename IterateFunc , typename AllocateRefCountFunc , typename IncrementRefCountFunc > |
| void | Rebuild (unsigned int Num, IterateFunc &&Iterate, AllocateRefCountFunc &&AllocateRefCount, IncrementRefCountFunc &&IncrementRefCount) |
| |
| void | RebuildFreeList () |
| |
| void | Trim (int maxIndex) |
| |
| void | Clear () |
| |
| void | InitDense (int Size, uint16 RefCountValue=1) |
| |
| IndexIterator | BeginIndices () const |
| |
| IndexIterator | EndIndices () const |
| |
| IndexEnumerable | Indices () const |
| |
| template<typename ToType > |
| MappedEnumerable< ToType > | MappedIndices (TFunction< ToType(int)> MapFunc) const |
| |
| FilteredEnumerable | FilteredIndices (TFunction< bool(int)> FilterFunc) const |
| |
| FString | UsageStats () const |
| |
| SIZE_T | GetByteCount () const |
| |
| void | Serialize (FArchive &Ar, bool bCompactData, bool bUseCompression) |
| |
FRefCountVector is used to keep track of which indices in a linear Index list are in use/referenced. A free list is tracked so that unreferenced indices can be re-used.
The enumerator iterates over valid indices (ie where refcount > 0)
- Warning
- refcounts are 16-bit ints (shorts) so the maximum count is 65536. behavior is undefined if this overflows.
-
No overflow checking is done in release builds.