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

#include <DelegateFilter.h>

+ Inheritance diagram for TDelegateFilter< ItemType >:
+ Collaboration diagram for TDelegateFilter< ItemType >:

Public Member Functions

 DECLARE_DELEGATE_RetVal_OneParam (bool, FPredicate, ItemType)
 
 TDelegateFilter (FPredicate InPredicate)
 
 DECLARE_DERIVED_EVENT (TDelegateFilter, IFilter< ItemType >::FChangedEvent, FChangedEvent)
 
virtual FChangedEventOnChanged () override
 
virtual bool PassesFilter (ItemType InItem) const override
 
void BroadcastChanged ()
 
- Public Member Functions inherited from IFilter< ItemType >
virtual ~IFilter ()
 
 DECLARE_EVENT (IFilter< ItemType >, FChangedEvent)
 
- Public Member Functions inherited from TSharedFromThis< TDelegateFilter< ItemType > >
TSharedRef< TDelegateFilter< ItemType >, Mode > AsShared ()
 
TSharedRef< TDelegateFilter< ItemType > const, Mode > AsShared () const
 
TWeakPtr< TDelegateFilter< ItemType >, Mode > AsWeak ()
 
TWeakPtr< TDelegateFilter< 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
 

Private Attributes

FPredicate Predicate
 
FChangedEvent ChangedEvent
 

Additional Inherited Members

- Public Types inherited from IFilter< ItemType >
typedef ItemType ItemType
 
- Protected Member Functions inherited from TSharedFromThis< TDelegateFilter< ItemType > >
 TSharedFromThis ()
 
 TSharedFromThis (TSharedFromThis const &)
 
FORCEINLINE TSharedFromThisoperator= (TSharedFromThis const &)
 
 ~TSharedFromThis ()
 
- Static Protected Member Functions inherited from TSharedFromThis< TDelegateFilter< 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 TDelegateFilter< ItemType >

A generic filter designed to call a predicate provided on construction to filter

Definition at line 15 of file DelegateFilter.h.

Constructor & Destructor Documentation

◆ TDelegateFilter()

TDelegateFilter Constructor

Parameters
InPredicateA required delegate called to determine if an Item passes the filter

Definition at line 27 of file DelegateFilter.h.

Member Function Documentation

◆ BroadcastChanged()

template<typename ItemType >
void TDelegateFilter< ItemType >::BroadcastChanged ( )
inline

Broadcasts the OnChanged event for this filter

Definition at line 48 of file DelegateFilter.h.

◆ DECLARE_DELEGATE_RetVal_OneParam()

template<typename ItemType >
TDelegateFilter< ItemType >::DECLARE_DELEGATE_RetVal_OneParam ( bool ,
FPredicate ,
ItemType  )

◆ DECLARE_DERIVED_EVENT()

◆ OnChanged()

template<typename ItemType >
virtual FChangedEvent & TDelegateFilter< ItemType >::OnChanged ( )
inlineoverridevirtual

Implements IFilter< ItemType >.

Definition at line 34 of file DelegateFilter.h.

◆ PassesFilter()

template<typename ItemType >
virtual bool TDelegateFilter< ItemType >::PassesFilter ( ItemType InItem) const
inlineoverridevirtual

Returns whether the specified Item passes the Filter's restrictions

Parameters
InItemThe Item is check
Returns
Whether the specified Item passed the filter

Implements IFilter< ItemType >.

Definition at line 42 of file DelegateFilter.h.

Member Data Documentation

◆ ChangedEvent

template<typename ItemType >
FChangedEvent TDelegateFilter< ItemType >::ChangedEvent
private

Fires whenever the filter changes

Definition at line 59 of file DelegateFilter.h.

◆ Predicate

template<typename ItemType >
FPredicate TDelegateFilter< ItemType >::Predicate
private

The delegate called to determine if an Item passes the filter

Definition at line 56 of file DelegateFilter.h.


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