Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
TFilterCollection< ItemType > Class Template Reference

#include <FilterCollection.h>

+ Inheritance diagram for TFilterCollection< ItemType >:
+ Collaboration 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)
 
FORCEINLINE 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
 
TWeakPtr< TFilterCollection< ItemType >, Mode > AsWeak ()
 
TWeakPtr< TFilterCollection< ItemType > const, Mode > AsWeak () const
 
FORCEINLINE void UpdateWeakReferenceInternal (TSharedPtr< SharedPtrType, Mode > const *InSharedPtr, OtherType *InObject) const
 
FORCEINLINE void UpdateWeakReferenceInternal (TSharedRef< SharedRefType, Mode > const *InSharedRef, OtherType *InObject) const
 
FORCEINLINE bool DoesSharedInstanceExist () const
 

Protected Member Functions

void OnChildFilterChanged ()
 
- Protected Member Functions inherited from TSharedFromThis< TFilterCollection< ItemType > >
 TSharedFromThis ()
 
 TSharedFromThis (TSharedFromThis const &)
 
FORCEINLINE 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 FORCEINLINE TSharedRef< OtherType, Mode > SharedThis (OtherType *ThisPtr)
 
static FORCEINLINE 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.

Definition at line 15 of file FilterCollection.h.

Constructor & Destructor Documentation

◆ ~TFilterCollection()

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

TFilterCollection destructor. Unregisters from all child filter changed delegates.

Definition at line 23 of file FilterCollection.h.

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

Definition at line 42 of file FilterCollection.h.

◆ 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

Definition at line 92 of file FilterCollection.h.

◆ Num()

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

Returns the number of Filters in the collection

Definition at line 98 of file FilterCollection.h.

◆ OnChanged()

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

Definition at line 124 of file FilterCollection.h.

◆ OnChildFilterChanged()

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

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

Definition at line 132 of file FilterCollection.h.

◆ 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

Definition at line 109 of file FilterCollection.h.

◆ 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

Definition at line 68 of file FilterCollection.h.

Member Data Documentation

◆ ChangedEvent

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

Fires whenever any filter in the collection changes

Definition at line 141 of file FilterCollection.h.

◆ ChildFilters

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

The array of child filters

Definition at line 138 of file FilterCollection.h.


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