FAINamedID

TCounter needs to supply following functions: default constructor typedef X Type; where X is an integer type to be used as ID's internal type TCounter::Type GetNextAvailableID() - returns next available ID and advances the internal counter uint32 GetSize() const - returns number of unique IDs created so far OnIndexForced(TCounter::Type Index) - called when given Index has been force-used.

Choose your operating system:

Windows

macOS

Linux

References

Module

AIModule

Header

/Engine/Source/Runtime/AIModule/Classes/AITypes.h

Include

#include "AITypes.h"

Syntax

template<typename TCounter>
struct FAINamedID

Remarks

TCounter needs to supply following functions: default constructor typedef X Type; where X is an integer type to be used as ID's internal type TCounter::Type GetNextAvailableID() - returns next available ID and advances the internal counter uint32 GetSize() const - returns number of unique IDs created so far OnIndexForced(TCounter::Type Index) - called when given Index has been force-used. Counter may need to update "next available ID"

Variables

Name Description

Public variable

const TCounter:...

 

Index

Public variable

const FName

 

Name

Constructors

Name Description

Public function

FAINamedID()

Public function

FAINamedID

(
    const FName& InName
)

Public function

FAINamedID

(
    const FAINamedID& Other
)

Protected function

FAINamedID

(
    const FName& InName,
    typename TCounter::Type InIndex
)

Back-door for forcing IDs

Functions

Name Description

Protected function Static

TCounter &

 

GetCounter()

Public function Static

uint32

 

GetSize()

Public function Static

FAINamedID< ...

 

InvalidID()

Public function Const

bool

 

IsValid()

Operators

Name Description

Public function Const

 

operator typename TCounter::Type()

Public function

FAINamedID &

 

operator=

(
    const FAINamedID& Other
)

Constants

Name

Description

Counter