UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
TFilterCollection< ItemType > Class Template Reference

#include <FilterCollection.h>

+ Inheritance diagram for TFilterCollection< ItemType >:

Public Member Functions

 ~TFilterCollection ()
 
int32 Add (const TSharedPtr< IFilter< ItemType > > &Filter)
 
int32 Remove (const TSharedPtr< IFilter< ItemType > > &Filter)
 
TSharedPtr< IFilter< ItemType > > GetFilterAtIndex (int32 Index)
 
UE_FORCEINLINE_HINT int32 Num () const
 
bool PassesAllFilters (ItemType InItem) const
 
 DECLARE_EVENT (TFilterCollection< ItemType >, FChangedEvent)
 
FChangedEventOnChanged ()
 
- Public Member Functions inherited from TSharedFromThis< TFilterCollection< ItemType > >
TSharedRef< TFilterCollection< ItemType >, Mode > AsShared ()
 
TSharedRef< TFilterCollection< ItemType > const, Mode > AsShared () const
 
TSharedRef< SubobjectType, Mode > AsSharedSubobject (SubobjectType *SubobjectPtr) const
 
TWeakPtr< TFilterCollection< ItemType >, Mode > AsWeak ()
 
TWeakPtr< TFilterCollection< ItemType > const, Mode > AsWeak () const
 
TWeakPtr< SubobjectType, Mode > AsWeakSubobject (SubobjectType *SubobjectPtr) const
 
void UpdateWeakReferenceInternal (TSharedPtr< SharedPtrType, SharedPtrMode > const *InSharedPtr, OtherType *InObject) const
 
void UpdateWeakReferenceInternal (TSharedRef< SharedRefType, SharedPtrMode > const *InSharedRef, OtherType *InObject) const
 
UE_FORCEINLINE_HINT bool DoesSharedInstanceExist () const
 

Protected Member Functions

void OnChildFilterChanged ()
 
- Protected Member Functions inherited from TSharedFromThis< TFilterCollection< ItemType > >
 TSharedFromThis ()
 
 TSharedFromThis (TSharedFromThis const &)
 
UE_FORCEINLINE_HINT TSharedFromThisoperator= (TSharedFromThis const &)
 
 ~TSharedFromThis ()
 

Protected Attributes

TArray< TSharedPtr< IFilter< ItemType > > > ChildFilters
 
FChangedEvent ChangedEvent
 

Additional Inherited Members

- Static Protected Member Functions inherited from TSharedFromThis< TFilterCollection< ItemType > >
static UE_FORCEINLINE_HINT TSharedRef< OtherType, Mode > SharedThis (OtherType *ThisPtr)
 
static UE_FORCEINLINE_HINT TSharedRef< OtherType const, Mode > SharedThis (const OtherType *ThisPtr)
 

Detailed Description

template<typename ItemType>
class TFilterCollection< ItemType >

A simple collection of Filters, with additional Filter specific functionality.

Constructor & Destructor Documentation

◆ ~TFilterCollection()

template<typename ItemType >
TFilterCollection< ItemType >::~TFilterCollection ( )
inline

TFilterCollection destructor. Unregisters from all child filter changed delegates.

Member Function Documentation

◆ Add()

template<typename ItemType >
int32 TFilterCollection< ItemType >::Add ( const TSharedPtr< IFilter< ItemType > > &  Filter)
inline

Adds the specified Filter to the collection

Parameters
FilterThe filter object to add to the collection
Returns
The index in the collection at which the filter was added

◆ DECLARE_EVENT()

template<typename ItemType >
TFilterCollection< ItemType >::DECLARE_EVENT ( TFilterCollection< ItemType >  ,
FChangedEvent   
)

Broadcasts anytime the restrictions of any of the child Filters change

◆ GetFilterAtIndex()

template<typename ItemType >
TSharedPtr< IFilter< ItemType > > TFilterCollection< ItemType >::GetFilterAtIndex ( int32  Index)
inline

Gets the filter at the specified index

Parameters
IndexThe index of the requested filter in the ChildFilters array.
Returns
Filter at the specified index

◆ Num()

template<typename ItemType >
UE_FORCEINLINE_HINT int32 TFilterCollection< ItemType >::Num ( ) const
inline

Returns the number of Filters in the collection

◆ OnChanged()

template<typename ItemType >
FChangedEvent & TFilterCollection< ItemType >::OnChanged ( )
inline

◆ OnChildFilterChanged()

template<typename ItemType >
void TFilterCollection< ItemType >::OnChildFilterChanged ( )
inlineprotected

Called when a child Filter restrictions change and broadcasts the FilterChanged delegate for the collection

◆ PassesAllFilters()

template<typename ItemType >
bool TFilterCollection< ItemType >::PassesAllFilters ( ItemType  InItem) const
inline

Returns whether the specified Item passes all of the filters in the collection

Parameters
InItemThe Item to check against all child filter restrictions
Returns
Whether the Item passed all child filter restrictions

◆ Remove()

template<typename ItemType >
int32 TFilterCollection< ItemType >::Remove ( const TSharedPtr< IFilter< ItemType > > &  Filter)
inline

Removes as many instances of the specified Filter as there are in the collection

Parameters
FilterThe filter object to remove from the collection
Returns
The number of Filters removed from the collection

Member Data Documentation

◆ ChangedEvent

template<typename ItemType >
FChangedEvent TFilterCollection< ItemType >::ChangedEvent
protected

Fires whenever any filter in the collection changes

◆ ChildFilters

template<typename ItemType >
TArray< TSharedPtr< IFilter< ItemType > > > TFilterCollection< ItemType >::ChildFilters
protected

The array of child filters


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