UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
uLang::TUPtrSetG< InElementType, AllowNull, InKeyType, InElementAllocatorType, RawAllocatorArgsType > Class Template Reference

#include <UniquePointerSet.h>

+ Inheritance diagram for uLang::TUPtrSetG< InElementType, AllowNull, InKeyType, InElementAllocatorType, RawAllocatorArgsType >:

Public Types

using KeyType = InKeyType
 

Public Member Functions

ULANG_FORCEINLINE TUPtrSetG (RawAllocatorArgsType &&... RawAllocatorArgs)
 
ULANG_FORCEINLINE TUPtrSetG (TUPtrSetG &&Other)
 
 TUPtrSetG (TUPtrSetG &&Other, int32_t ExtraSlack)
 
int32_t IndexOf (const KeyType &Key) const
 
ULANG_FORCEINLINE ElementTypeFind (const KeyType &Key) const
 
bool Contains (const KeyType &Key) const
 
void Append (const TUPtrSetG &Other)
 
void Append (TUPtrSetG &&Other)
 
TUPtrSetGoperator+= (TUPtrSetG &&Other)
 
TUPtrSetGoperator+= (const TUPtrSetG &Other)
 
template<typename... CtorArgsType>
ULANG_FORCEINLINE int32_t AddNew (CtorArgsType &&... CtorArgs)
 
ULANG_FORCEINLINE int32_t Add (PointerType &&Item)
 
int32_t Remove (const KeyType &Key)
 

Friends

template<typename OtherElementType , bool OtherAllowNull, typename OtherKeyType , typename OtherElementAllocatorType , typename... OtherRawAllocatorArgsType>
class TUPtrSetG
 

Additional Inherited Members

- Protected Types inherited from uLang::TUPtrArrayG< InElementType, AllowNull, InElementAllocatorType, RawAllocatorArgsType... >
using ElementType = InElementType
 
using ElementAllocatorType = InElementAllocatorType
 
using PointerType = TUPtrG< ElementType, AllowNull, typename InElementAllocatorType::RawAllocatorType, RawAllocatorArgsType... >
 
using PointerStorageType = TArrayG< ElementType *, InElementAllocatorType, RawAllocatorArgsType... >
 
- Protected Member Functions inherited from uLang::TUPtrArrayG< InElementType, AllowNull, InElementAllocatorType, RawAllocatorArgsType... >
ULANG_FORCEINLINE void Delete (int32_t Index)
 
ULANG_FORCEINLINE void DeleteRange (int32_t BeginIndex, int32_t EndIndex)
 
ULANG_FORCEINLINE void DeleteAll ()
 
ULANG_FORCEINLINE TUPtrArrayG (RawAllocatorArgsType &&... RawAllocatorArgs)
 
ULANG_FORCEINLINE TUPtrArrayG (TUPtrArrayG &&Other)
 
 TUPtrArrayG (TUPtrArrayG &&Other, int32_t ExtraSlack)
 
TUPtrArrayGoperator= (TUPtrArrayG &&Other)
 
 ~TUPtrArrayG ()
 
ULANG_FORCEINLINE int32_t GetSlack () const
 
ULANG_FORCEINLINE bool IsValidIndex (int32_t Index) const
 
ULANG_FORCEINLINE int32_t Num () const
 
ULANG_FORCEINLINE int32_t Max () const
 
ULANG_FORCEINLINE bool IsEmpty () const
 
ULANG_FORCEINLINE bool IsFilled () const
 
ULANG_FORCEINLINE ElementTypeoperator[] (int32_t Index) const
 
ULANG_FORCEINLINE PointerType Pop (bool bAllowShrinking=true)
 
ULANG_FORCEINLINE void Push (PointerType &&Item)
 
ULANG_FORCEINLINE ElementTypeTop () const
 
ULANG_FORCEINLINE ElementTypeLast (int32_t IndexFromTheEnd=0) const
 
ULANG_FORCEINLINE void Shrink ()
 
ULANG_FORCEINLINE bool Find (ElementType *Item, int32_t &Index) const
 
ULANG_FORCEINLINE int32_t Find (ElementType *Item) const
 
ULANG_FORCEINLINE bool FindLast (const PointerType &Item, int32_t &Index) const
 
ULANG_FORCEINLINE int32_t FindLast (const PointerType &Item) const
 
ULANG_FORCEINLINE int32_t FindLastByPredicate (Predicate Pred, int32_t Count) const
 
ULANG_FORCEINLINE int32_t FindLastByPredicate (Predicate Pred) const
 
int32_t IndexOfByKey (const KeyType &Key) const
 
int32_t IndexOfByPredicate (Predicate Pred) const
 
ULANG_FORCEINLINE ElementTypeFindByKey (const KeyType &Key) const
 
ULANG_FORCEINLINE ElementTypeFindByPredicate (Predicate Pred) const
 
bool Contains (const ElementType *Pointer) const
 
bool ContainsByKey (const ComparisonType &Key) const
 
ULANG_FORCEINLINE bool ContainsByPredicate (Predicate Pred) const
 
void InsertZeroed (int32_t Index, int32_t Count=1)
 
int32_t Insert (TUPtrArrayG &&Items, const int32_t InIndex)
 
int32_t Insert (PointerType &&Item, int32_t Index)
 
ULANG_FORCEINLINE PointerType RemoveAt (int32_t Index)
 
ULANG_FORCEINLINE void RemoveAt (int32_t Index, CountType Count, bool bAllowShrinking=true)
 
ULANG_FORCEINLINE PointerType RemoveAtSwap (int32_t Index)
 
ULANG_FORCEINLINE void RemoveAtSwap (int32_t Index, CountType Count, bool bAllowShrinking=true)
 
int32_t ReplaceAt (PointerType &&Item, int32_t Index)
 
void Reset (int32_t NewSize=0)
 
void Empty (int32_t Slack=0)
 
void SetNumZeroed (int32_t NewNum, bool bAllowShrinking=true)
 
void Append (TUPtrArrayG &&Source)
 
TUPtrArrayGoperator+= (TUPtrArrayG &&Other)
 
ULANG_FORCEINLINE int32_t AddNew (CtorArgsType &&... CtorArgs)
 
ULANG_FORCEINLINE void InsertNew (int32_t Index, CtorArgsType &&... CtorArgs)
 
ULANG_FORCEINLINE int32_t Add (PointerType &&Item)
 
int32_t AddZeroed (int32_t Count=1)
 
ULANG_FORCEINLINE int32_t AddUnique (PointerType &&Item)
 
ULANG_FORCEINLINE void Reserve (int32_t Number)
 
int32_t RemoveAll (const Predicate &Pred)
 
void RemoveAllSwap (const Predicate &Pred, bool bAllowShrinking=true)
 
void Sort ()
 
void Sort (const PredicateType &Predicate)
 
ULANG_FORCEINLINE TUPtrArrayG< OtherElementType, OtherAllowNull, ElementAllocatorType, RawAllocatorArgsType... > & As ()
 
ULANG_FORCEINLINE const TUPtrArrayG< OtherElementType, OtherAllowNull, ElementAllocatorType, RawAllocatorArgsType... > & As () const
 
ULANG_FORCEINLINE ElementType ** begin ()
 
ULANG_FORCEINLINE ElementType *const * begin () const
 
ULANG_FORCEINLINE ElementType ** end ()
 
ULANG_FORCEINLINE ElementType *const * end () const
 
- Protected Attributes inherited from uLang::TUPtrArrayG< InElementType, AllowNull, InElementAllocatorType, RawAllocatorArgsType... >
PointerStorageType _PointerStorage
 

Detailed Description

template<typename InElementType, bool AllowNull, typename InKeyType, typename InElementAllocatorType, typename... RawAllocatorArgsType>
class uLang::TUPtrSetG< InElementType, AllowNull, InKeyType, InElementAllocatorType, RawAllocatorArgsType >

Templated dynamic set of shared pointers to elements This is similar to TUPtrArrayG, plus elements are always kept in sorted order and looked up via binary search

Member Typedef Documentation

◆ KeyType

Constructor & Destructor Documentation

◆ TUPtrSetG() [1/3]

Constructor

◆ TUPtrSetG() [2/3]

Move constructor.

Parameters
OtherArray to move from.

◆ TUPtrSetG() [3/3]

Move constructor.

Parameters
OtherArray to move from.
ExtraSlackTells how much extra pointer memory should be preallocated at the end of the array in the number of elements.

Member Function Documentation

◆ Add()

Adds a new item. Must not exist yet.

Move semantics version.

Parameters
ItemThe item to add
Returns
Index to the new item
See also
AddDefaulted, AddUnique, AddZeroed, Append, Insert

◆ AddNew()

template<typename InElementType , bool AllowNull, typename InKeyType , typename InElementAllocatorType , typename... RawAllocatorArgsType>
template<typename... CtorArgsType>
ULANG_FORCEINLINE int32_t uLang::TUPtrSetG< InElementType, AllowNull, InKeyType, InElementAllocatorType, RawAllocatorArgsType >::AddNew ( CtorArgsType &&...  CtorArgs)
inline

Constructs a new item at the end of the array, possibly reallocating the whole array to fit.

Parameters
ArgsThe arguments to forward to the constructor of the new item.
Returns
Index to the new item

◆ Append() [1/2]

Appends the specified array to this array.

Allocator changing version.

Parameters
SourceThe array to append.
See also
Add, Insert

◆ Append() [2/2]

Appends the specified array to this array.

Parameters
SourceThe array to append.
See also
Add, Insert

◆ Contains()

template<typename InElementType , bool AllowNull, typename InKeyType , typename InElementAllocatorType , typename... RawAllocatorArgsType>
bool uLang::TUPtrSetG< InElementType, AllowNull, InKeyType, InElementAllocatorType, RawAllocatorArgsType >::Contains ( const KeyType Key) const
inline

Checks if this array contains the element.

Returns
True if found. False otherwise.
See also
ContainsByPredicate, FilterByPredicate, FindByPredicate

◆ Find()

Finds an item by key (assuming the ElementType overloads operator== for the comparison).

Parameters
KeyThe key to search by.
Returns
Pointer to the first matching element, or nullptr if none is found.
See also
Find

◆ IndexOf()

template<typename InElementType , bool AllowNull, typename InKeyType , typename InElementAllocatorType , typename... RawAllocatorArgsType>
int32_t uLang::TUPtrSetG< InElementType, AllowNull, InKeyType, InElementAllocatorType, RawAllocatorArgsType >::IndexOf ( const KeyType Key) const
inline

Finds an item by key (assuming the ElementType overloads operator< and operator== for the comparison).

Parameters
KeyThe key to search by.
Returns
Index to the first matching element, or IndexNone if none is found.

◆ operator+=() [1/2]

Appends the specified array to this array. Cannot append to self.

Parameters
OtherThe array to append.

◆ operator+=() [2/2]

Appends the specified array to this array. Cannot append to self.

Move semantics version.

Parameters
OtherThe array to append.

◆ Remove()

Removes as many instances of Item as there are in the array, maintaining order but not indices.

Parameters
ItemItem to remove from array.
Returns
Number of removed elements.
See also
Add, Insert, RemoveAll, RemoveAllSwap, RemoveSingle, RemoveSwap

Friends And Related Symbol Documentation

◆ TUPtrSetG

template<typename InElementType , bool AllowNull, typename InKeyType , typename InElementAllocatorType , typename... RawAllocatorArgsType>
template<typename OtherElementType , bool OtherAllowNull, typename OtherKeyType , typename OtherElementAllocatorType , typename... OtherRawAllocatorArgsType>
friend class TUPtrSetG
friend

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