XII Release 0.1.0
Loading...
Searching...
No Matches
xiiTagRegistry Class Reference

#include <TagRegistry.h>

Public Member Functions

const xiiTag & RegisterTag (xiiStringView sTagString)
 Ensures the tag with the given name exists and returns a pointer to it.
const xiiTag & RegisterTag (const xiiHashedString &sTagString)
 Ensures the tag with the given name exists and returns a pointer to it.
const xiiTag * GetTagByName (const xiiTempHashedString &sTagString) const
 Searches for a tag with the given name and returns a pointer to it.
const xiiTag * GetTagByMurmurHash (xiiUInt32 uiMurmurHash) const
 Searches for a tag with the given murmur hash. This function is only for backwards compatibility.
const xiiTag * GetTagByIndex (xiiUInt32 uiIndex) const
 Returns the tag with the given index.
xiiUInt32 GetNumTags () const
 Returns the number of registered tags.
xiiResult Load (xiiStreamReader &ref_stream)

Static Public Member Functions

static xiiTagRegistry & GetGlobalRegistry ()

Protected Attributes

xiiMutex m_TagRegistryMutex
xiiMap< xiiTempHashedString, xiiTag > m_RegisteredTags
xiiDeque< xiiTag * > m_TagsByIndex

Detailed Description

The tag registry for tags in tag sets.

Normal usage of the tag registry is to get the global tag registry instance via xiiTagRegistry::GetGlobalRegistry() and to use this instance to register and get tags. Certain special cases (e.g. tests) may actually need their own instance of the tag registry. Note however that tags which were registered with one registry shouldn't be used with tag sets filled with tags from another registry since there may be conflicting tag assignments. The tag registry registration and tag retrieval functions are thread safe due to a mutex.

Member Function Documentation

◆ Load()

xiiResult xiiTagRegistry::Load ( xiiStreamReader & ref_stream)

Loads the saved state and integrates it into this registry. Does not discard previously registered tag information. This function is only for backwards compatibility.


The documentation for this class was generated from the following files:
  • /home/runner/work/XII/XII/Source/Engine/Foundation/Types/TagRegistry.h
  • /home/runner/work/XII/XII/Source/Engine/Foundation/Types/Implementation/TagRegistry.cpp