Open 3D Engine Atom Gem API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AZ::RHI::TagBitRegistry< IndexType > Class Template Referencefinal

#include <TagBitRegistry.h>

Inherits AZStd::intrusive_base.

Public Types

using TagType = Handle< IndexType >
 

Public Member Functions

 AZ_CLASS_ALLOCATOR (TagBitRegistry, AZ::SystemAllocator)
 
 AZ_DISABLE_COPY_MOVE (TagBitRegistry)
 
void Reset ()
 Resets the registry back to an empty state. All references are released.
 
TagType AcquireTag (const Name &tagName)
 
void ReleaseTag (TagType tagName)
 
TagType FindTag (const Name &tagName) const
 
Name GetName (TagType tag) const
 Returns the name of the given tag, or empty string if the tag is not registered.
 
size_t GetAllocatedTagCount () const
 Returns the number of allocated tags in the registry.
 
template<class TagVisitor >
void VisitTags (TagVisitor visitor)
 

Static Public Member Functions

static Ptr< TagBitRegistryCreate ()
 

Detailed Description

template<typename IndexType>
class AZ::RHI::TagBitRegistry< IndexType >

A variant of TagRegistry that stores bit masks directly. The maximum number of tags is inferred from the number of bits available in TagType. Tags will always have a single bit flipped to 1. See TagRegistry for more details.

Member Function Documentation

◆ AcquireTag()

template<typename IndexType >
auto AZ::RHI::TagBitRegistry< IndexType >::AcquireTag ( const Name &  tagName)

Acquires a tag from the provided name (case sensitive). If the tag already existed, it is ref-counted. Returns a valid tag on success; returns a null tag if the registry is at full capacity. You must call ReleaseTag() if successful.

◆ FindTag()

template<typename IndexType >
auto AZ::RHI::TagBitRegistry< IndexType >::FindTag ( const Name &  tagName) const

Finds the tag associated with the provided name (case sensitive). If a tag exists with that name, the tag is returned. The reference count is NOT incremented on success; ownership is not passed to the user. If the tag does not exist, a null tag is returned.

◆ ReleaseTag()

template<typename IndexType >
void AZ::RHI::TagBitRegistry< IndexType >::ReleaseTag ( TagType  tagName)

Releases a reference to a tag. Tags are ref-counted, so it's necessary to maintain ownership of the tag and release when its no longer needed.


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