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::NameIdReflectionMap< IndexType > Class Template Reference

#include <NameIdReflectionMap.h>


class  NameIdReflectionMapSerializationEvents

Public Member Functions

void Clear ()
 Clears the container back to empty.
void Reserve (size_t capacity)
 Reserves sufficient memory for capacity elements.
bool Insert (const Name &id, IndexType index)
 Inserts a new id -> index mapping. Emits an error and returns false if the same entry is added twice.
IndexType Find (const Name &id) const
 Finds and returns the index associated with the requested id. If no matching id exists, a null index is returned.
Name Find (IndexType index) const
 Finds and returns the name associated with the index mapping. If no matching index mapping exists, an empty name is returned.
size_t Size () const
 Return the number of entries.
bool IsEmpty () const

Static Public Member Functions

static void Reflect (ReflectContext *context)

Detailed Description

template<typename IndexType = Handle<>>
class AZ::RHI::NameIdReflectionMap< IndexType >

This class is a simple utility for mapping an AZ::Name to an RHI::Handle<> instance. It is useful for implementing name-to-index reflection. It uses a sorted vector with binary search to be cache friendly and use a single allocation (when serialized).

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