FTypedElementCounter

Tracks various categories of counters for the typed elements (eg, the number of elements of a given type).

Choose your operating system:

Windows

macOS

Linux

References

Module

TypedElementFramework

Header

/Engine/Source/Runtime/TypedElementFramework/Public/Elements/Framework/TypedElementCounter.h

Include

#include "Elements/Framework/TypedElementCounter.h"

Syntax

class FTypedElementCounter

Remarks

Tracks various categories of counters for the typed elements (eg, the number of elements of a given type). The categories counted may be expanded by element types that implement the UTypedElementCounterInterface API.

Constructors

Functions

Name Description

Public function

void

 

AddElement

(
    const FTypedElementHandle& InEleme...
)

Update the counter categories to include the given element.

Public function

void

 

ClearCounter

(
    const FName InCategory,
    const KeyType& InKey
)

Clear the value of the counter for the given category and key.

Public function

void

 

ClearCounters()

Clear all counters.

Public function

void

 

ClearCounters

(
    const FName InCategory
)

Clear the value of the counters for the given category.

Public function

void

 

DecrementCounter

(
    const FName InCategory,
    const KeyType& InKey
)

Decrement the counter for the given category and key.

Public function Const

void

 

ForEachCounterValue

(
    const FName InCategory,
    TFunctionRef< bool(const KeyType&,...
)

Enumerate the value of the counters for the given category.

Public function Const

FCounterValu...

 

GetCounterValue

(
    const FName InCategory,
    const KeyType& InKey
)

Get the value of the counter for the given category and key, or zero if the category or key are unknown.

Public function Static

FName

 

GetElementTypeCategoryName()

Get the category name used to count element types (by type ID).

Public function

void

 

IncrementCounter

(
    const FName InCategory,
    const KeyType& InKey
)

Increment the counter for the given category and key.

Public function

void

 

Initialize

(
    UTypedElementRegistry* InRegis...
)

Explicitly initialize this instance, if it was previously default constructed.

Public function

void

 

RemoveElement

(
    const FTypedElementHandle& InEleme...
)

Update the counter categories to remove the given element.

Operators

Name Description

Public function

FTypedElemen...

 

operator=

(
    FTypedElementCounter&&
)

Public function

FTypedElemen...

 

operator=

(
    const FTypedElementCounter&
)

Typedefs

Name

Description

FCounterValue