UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
uLang::CSymbolTable Class Reference

Database keeping track of symbols and their text equivalent. More...

#include <Symbol.h>

+ Inheritance diagram for uLang::CSymbolTable:

Public Member Functions

UE_API CSymbolTable (uint32_t NumHashBuckets=1024, uint32_t IdChunkShift=10)
 
UE_API ~CSymbolTable ()
 
CSymbol Get (SymbolId Id) const
 Gets a symbol by id - id must exist.
 
UE_API TOptional< CSymbolFind (const CUTF8StringView &Text, bool bIsGenerated=false) const
 Looks up a symbol by text.
 
UE_API TOptional< CSymbolAdd (const CUTF8StringView &Text, bool bIsGenerated=false)
 Looks up a symbol by text, and if not present yet, adds it. Return empty optional if text is to long.
 
UE_API CSymbol AddChecked (const CUTF8StringView &Text, bool bIsGenerated=false)
 Looks up a symbol by text, and if not present yet, adds it. Asserts if text is to long.
 
UE_API void ReAdd (CSymbol &Symbol)
 
- Public Member Functions inherited from uLang::CSharedMix
 CSharedMix ()
 
virtual UE_API ~CSharedMix ()
 
 CSharedMix (const CSharedMix &Other)=delete
 
CSharedMixoperator= (const CSharedMix &Other)=delete
 
uint32_t GetRefCount () const
 

Static Public Attributes

static constexpr uint32_t MaxSymbolLength = 1024
 The max length of a symbol.
 

Friends

class CSymbol
 

Additional Inherited Members

- Static Protected Member Functions inherited from uLang::CSharedMix
template<class ObjectType >
static TSPtrG< ObjectType, false, CHeapRawAllocatorSharedThis (ObjectType *This)
 
template<class ObjectType >
static TSPtrG< const ObjectType, false, CHeapRawAllocatorSharedThis (const ObjectType *This)
 

Detailed Description

Database keeping track of symbols and their text equivalent.

Constructor & Destructor Documentation

◆ CSymbolTable()

uLang::CSymbolTable::CSymbolTable ( uint32_t  NumHashBuckets = 1024,
uint32_t  IdChunkShift = 10 
)
Parameters
NumHashBucketsHow many hash buckets are used for lookup by text (use 0 to disable text lookup)
IdChunkShift2^IdChunkShift pointers are stored in a chunk for lookup by id (use 0 to disable id lookup)

◆ ~CSymbolTable()

uLang::CSymbolTable::~CSymbolTable ( )

Member Function Documentation

◆ Add()

TOptional< CSymbol > uLang::CSymbolTable::Add ( const CUTF8StringView Text,
bool  bIsGenerated = false 
)

Looks up a symbol by text, and if not present yet, adds it. Return empty optional if text is to long.

◆ AddChecked()

CSymbol uLang::CSymbolTable::AddChecked ( const CUTF8StringView Text,
bool  bIsGenerated = false 
)

Looks up a symbol by text, and if not present yet, adds it. Asserts if text is to long.

◆ Find()

TOptional< CSymbol > uLang::CSymbolTable::Find ( const CUTF8StringView Text,
bool  bIsGenerated = false 
) const

Looks up a symbol by text.

◆ Get()

ULANG_FORCEINLINE CSymbol uLang::CSymbolTable::Get ( SymbolId  Id) const

Gets a symbol by id - id must exist.

◆ ReAdd()

void uLang::CSymbolTable::ReAdd ( CSymbol Symbol)

Remaps a symbol from another symbol table to this symbol table I.e. symbol tables are merged by iterating through all symbols of one table and re-adding them to the other table

Friends And Related Symbol Documentation

◆ CSymbol

friend class CSymbol
friend

Member Data Documentation

◆ MaxSymbolLength

constexpr uint32_t uLang::CSymbolTable::MaxSymbolLength = 1024
staticconstexpr

The max length of a symbol.


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