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

Enumerations

enum class  EIsEditable {
  Yes , NotEditableType , MissingConcrete , CastableTypesNotEditable ,
  ClassifiableSubsetParametricArgumentInvalid
}
 

Functions

VERSECOMPILER_API const CClassAsSingleClass (const CNormalType &NegativeType, const CNormalType &PositiveType)
 
VERSECOMPILER_API const CInterfaceAsSingleInterface (const CNormalType &NegativeType, const CNormalType &PositiveType)
 
VERSECOMPILER_API TArray< STypeVariableSubstitutionInstantiate (const TArray< const CTypeVariable * > &TypeVariables, const uint32_t UploadedAtFnVersion)
 
VERSECOMPILER_API const CTypeBaseSubstitute (const CTypeBase &, ETypePolarity Polarity, const TArray< STypeVariableSubstitution > &InstTypeVariables)
 
VERSECOMPILER_API const CFunctionTypeInstantiate (const CFunctionType *FunctionType, const uint32_t UploadedAtFnVersion)
 
VERSECOMPILER_API const CTypeBaseCanonicalize (const CTypeBase &)
 
VERSECOMPILER_API const CFunctionTypeCanonicalize (const CFunctionType &)
 
VERSECOMPILER_API const CTupleTypeCanonicalize (const CTupleType &)
 
VERSECOMPILER_API const CTypeBaseAsPolarity (const CTypeBase &, const TArray< SInstantiatedTypeVariable > &, ETypePolarity)
 
VERSECOMPILER_API const CTypeBaseAsPositive (const CTypeBase &, const TArray< SInstantiatedTypeVariable > &)
 
VERSECOMPILER_API const CTypeBaseAsNegative (const CTypeBase &, const TArray< SInstantiatedTypeVariable > &)
 
VERSECOMPILER_API bool Constrain (const CTypeBase *PositiveType1, const CTypeBase *NegativeType2, const uint32_t UploadedAtFnVersion)
 Constrain PositiveType1 to be a subtype of NegativeType2
 
VERSECOMPILER_API bool IsSubtype (const CTypeBase *PositiveType1, const CTypeBase *PositiveType2, const uint32_t UploadedAtFnVersion)
 Determine if PositiveType1 is a subtype of PositiveType2
 
VERSECOMPILER_API bool IsEquivalent (const CTypeBase *PositiveType1, const CTypeBase *PositiveType2, const uint32_t UploadedAtFnVersion)
 Determine if PositiveType1 is equivalent to PositiveType2
 
VERSECOMPILER_API bool Matches (const CTypeBase *PositiveType1, const CTypeBase *NegativeType2, const uint32_t UploadedAtFnVersion)
 Determine if argument PositiveType1 is a match for parameter NegativeType2
 
VERSECOMPILER_API const CTypeBaseSkipIdentityFlowType (const CFlowType &, ETypePolarity, const uint32_t UploadedAtFnVersion)
 
VERSECOMPILER_API const CTypeBaseSkipIdentityFlowType (const CTypeBase &, ETypePolarity, const uint32_t UploadedAtFnVersion)
 
VERSECOMPILER_API const CTypeBaseSkipEmptyFlowType (const CTypeBase &)
 
VERSECOMPILER_API const CTypeBaseJoin (const CTypeBase *Type1, const CTypeBase *Type2, const uint32_t UploadedAtFnVersion)
 Compute the join of Type1 and Type2: the "least" type that contains all values contained by either Type1 or Type2.
 
VERSECOMPILER_API const CTypeBaseMeet (const CTypeBase *Type1, const CTypeBase *Type2, const uint32_t UploadedAtFnVersion)
 Compute the meet of Type1 and Type2: the "greatest" type that contains only values contained by both Type1 and Type2.
 
VERSECOMPILER_API bool AreDomainsDistinct (const CTypeBase *DomainType1, const CTypeBase *DomainType2, const uint32_t UploadedAtFnVersion)
 Determine whether there two types are distinct; i.e. that there are no values that are members of both types.
 
VERSECOMPILER_API bool IsUnknownType (const CTypeBase *Type)
 
VERSECOMPILER_API bool IsAttributeType (const CTypeBase *Type)
 
VERSECOMPILER_API void VisitAllDefinitions (const CTypeBase *Type, const CAstPackage *VisitorPackage, const TFunction< void(const CDefinition &, const CSymbol &)> &Functor)
 
VERSECOMPILER_API void ForEachDataType (const CTypeBase *, const TFunction< void(const CTypeBase *)> &)
 
VERSECOMPILER_API void ForEachDataTypeRecursive (const CTypeBase *, const TFunction< void(const CTypeBase *)> &)
 
bool IsStringType (const CNormalType &NormalType)
 
bool IsMessageType (const CNormalType &NormalType)
 
bool IsAgentTypeExclusive (const CTypeBase *Type)
 
bool IsLeaderboardType (const CNormalType &NormalType)
 
VERSECOMPILER_API const charIsEditableToCMessage (EIsEditable IsEditable)
 
VERSECOMPILER_API EIsEditable IsEditableType (const uLang::CTypeBase *Type, const CAstPackage *ContextPackage)
 
VERSECOMPILER_API EIsEditable IsEditableClassType (const uLang::CTypeBase *Type)
 
VERSECOMPILER_API const CTypeBaseRemovePointer (const CTypeBase *Type, ETypePolarity Polarity)
 
VERSECOMPILER_API const CTypeBaseRemoveReference (const CTypeBase *Type, ETypePolarity Polarity)
 
VERSECOMPILER_API const CNormalTypeStripVariableAndConstraints (const CNormalType &)
 
VERSECOMPILER_API const CNormalTypeStripVariableAndConstraints (const CNormalType &, ETypeConstraintFlags &outConstraintFlags)
 
VERSECOMPILER_API CClassDefinitionEnclosingClassOfDataDefinition (const CDataDefinition *Def)
 
VERSECOMPILER_API const CTypeBaseDecayReference (const CTypeBase *)
 
VERSECOMPILER_API const CTypeBaseDecayReference (const CTypeBase &)
 
VERSECOMPILER_API void FillTypeVariablePolarities (const CTypeBase *, ETypePolarity, STypeVariablePolarities &)
 
VERSECOMPILER_API void FillTypeVariablePolaritiesImpl (const CTypeBase *, ETypePolarity, STypeVariablePolarities &, TArray< SNormalTypePolarity > &Visited)
 

Detailed Description

Helper utilities for managing different types.

Enumeration Type Documentation

◆ EIsEditable

Enumerator
Yes 
NotEditableType 
MissingConcrete 
CastableTypesNotEditable 
ClassifiableSubsetParametricArgumentInvalid 

Function Documentation

◆ AreDomainsDistinct()

bool uLang::SemanticTypeUtils::AreDomainsDistinct ( const CTypeBase DomainType1,
const CTypeBase DomainType2,
const uint32_t  UploadedAtFnVersion 
)

Determine whether there two types are distinct; i.e. that there are no values that are members of both types.

◆ AsNegative()

const CTypeBase & uLang::SemanticTypeUtils::AsNegative ( const CTypeBase Type,
const TArray< SInstantiatedTypeVariable > &  Substitutions 
)

◆ AsPolarity()

const CTypeBase & uLang::SemanticTypeUtils::AsPolarity ( const CTypeBase Type,
const TArray< SInstantiatedTypeVariable > &  Substitutions,
ETypePolarity  DesiredPolarity 
)

◆ AsPositive()

const CTypeBase & uLang::SemanticTypeUtils::AsPositive ( const CTypeBase Type,
const TArray< SInstantiatedTypeVariable > &  Substitutions 
)

◆ AsSingleClass()

const CClass * uLang::SemanticTypeUtils::AsSingleClass ( const CNormalType NegativeType,
const CNormalType PositiveType 
)

◆ AsSingleInterface()

const CInterface * uLang::SemanticTypeUtils::AsSingleInterface ( const CNormalType NegativeType,
const CNormalType PositiveType 
)

◆ Canonicalize() [1/3]

const CFunctionType & uLang::SemanticTypeUtils::Canonicalize ( const CFunctionType Type)

◆ Canonicalize() [2/3]

const CTupleType & uLang::SemanticTypeUtils::Canonicalize ( const CTupleType Type)

◆ Canonicalize() [3/3]

const CTypeBase & uLang::SemanticTypeUtils::Canonicalize ( const CTypeBase Type)

Replace all types with equivalent representations with a single canonical type - the type used when emitting code. In particular, type variables are erased.

◆ Constrain()

bool uLang::SemanticTypeUtils::Constrain ( const CTypeBase PositiveType1,
const CTypeBase NegativeType2,
const uint32_t  UploadedAtFnVersion 
)

Constrain PositiveType1 to be a subtype of NegativeType2

◆ DecayReference() [1/2]

const CTypeBase * uLang::SemanticTypeUtils::DecayReference ( const CTypeBase Type)

◆ DecayReference() [2/2]

const CTypeBase * uLang::SemanticTypeUtils::DecayReference ( const CTypeBase Type)

◆ EnclosingClassOfDataDefinition()

CClassDefinition * uLang::SemanticTypeUtils::EnclosingClassOfDataDefinition ( const CDataDefinition Def)

◆ FillTypeVariablePolarities()

void uLang::SemanticTypeUtils::FillTypeVariablePolarities ( const CTypeBase Type,
ETypePolarity  Polarity,
STypeVariablePolarities TypeVariablePolarities 
)

◆ FillTypeVariablePolaritiesImpl()

void uLang::SemanticTypeUtils::FillTypeVariablePolaritiesImpl ( const CTypeBase Type,
ETypePolarity  Polarity,
STypeVariablePolarities TypeVariablePolarities,
TArray< SNormalTypePolarity > &  Visited 
)

◆ ForEachDataType()

void uLang::SemanticTypeUtils::ForEachDataType ( const CTypeBase Type,
const TFunction< void(const CTypeBase *)> &  F 
)

Apply a function to each immediately possibly contained value's type. Note for CFunctionType, the function is not applied, as values of a given function type do not contain parameter or result values.

◆ ForEachDataTypeRecursive()

void uLang::SemanticTypeUtils::ForEachDataTypeRecursive ( const CTypeBase Type,
const TFunction< void(const CTypeBase *)> &  F 
)

ForEachDataType, but recursive, and depth-first, top-down, including the immediately passed type.

◆ Instantiate() [1/2]

const CFunctionType * uLang::SemanticTypeUtils::Instantiate ( const CFunctionType FunctionType,
const uint32_t  UploadedAtFnVersion 
)

◆ Instantiate() [2/2]

TArray< STypeVariableSubstitution > uLang::SemanticTypeUtils::Instantiate ( const TArray< const CTypeVariable * > &  TypeVariables,
const uint32_t  UploadedAtFnVersion 
)

◆ IsAgentTypeExclusive()

bool uLang::SemanticTypeUtils::IsAgentTypeExclusive ( const CTypeBase Type)

◆ IsAttributeType()

bool uLang::SemanticTypeUtils::IsAttributeType ( const CTypeBase Type)

◆ IsEditableClassType()

SemanticTypeUtils::EIsEditable uLang::SemanticTypeUtils::IsEditableClassType ( const uLang::CTypeBase Type)

◆ IsEditableToCMessage()

const char * uLang::SemanticTypeUtils::IsEditableToCMessage ( EIsEditable  IsEditable)

◆ IsEditableType()

SemanticTypeUtils::EIsEditable uLang::SemanticTypeUtils::IsEditableType ( const uLang::CTypeBase Type,
const CAstPackage ContextPackage 
)

◆ IsEquivalent()

bool uLang::SemanticTypeUtils::IsEquivalent ( const CTypeBase PositiveType1,
const CTypeBase PositiveType2,
const uint32_t  UploadedAtFnVersion 
)

Determine if PositiveType1 is equivalent to PositiveType2

◆ IsLeaderboardType()

bool uLang::SemanticTypeUtils::IsLeaderboardType ( const CNormalType NormalType)

◆ IsMessageType()

bool uLang::SemanticTypeUtils::IsMessageType ( const CNormalType NormalType)

◆ IsStringType()

bool uLang::SemanticTypeUtils::IsStringType ( const CNormalType NormalType)
inline

◆ IsSubtype()

bool uLang::SemanticTypeUtils::IsSubtype ( const CTypeBase PositiveType1,
const CTypeBase PositiveType2,
const uint32_t  UploadedAtFnVersion 
)

Determine if PositiveType1 is a subtype of PositiveType2

◆ IsUnknownType()

bool uLang::SemanticTypeUtils::IsUnknownType ( const CTypeBase Type)

◆ Join()

const CTypeBase * uLang::SemanticTypeUtils::Join ( const CTypeBase Type1,
const CTypeBase Type2,
const uint32_t  UploadedAtFnVersion 
)

Compute the join of Type1 and Type2: the "least" type that contains all values contained by either Type1 or Type2.

◆ Matches()

bool uLang::SemanticTypeUtils::Matches ( const CTypeBase PositiveType1,
const CTypeBase NegativeType2,
const uint32_t  UploadedAtFnVersion 
)

Determine if argument PositiveType1 is a match for parameter NegativeType2

◆ Meet()

const CTypeBase * uLang::SemanticTypeUtils::Meet ( const CTypeBase Type1,
const CTypeBase Type2,
const uint32_t  UploadedAtFnVersion 
)

Compute the meet of Type1 and Type2: the "greatest" type that contains only values contained by both Type1 and Type2.

◆ RemovePointer()

const CTypeBase * uLang::SemanticTypeUtils::RemovePointer ( const CTypeBase Type,
ETypePolarity  Polarity 
)

◆ RemoveReference()

const CTypeBase * uLang::SemanticTypeUtils::RemoveReference ( const CTypeBase Type,
ETypePolarity  Polarity 
)

◆ SkipEmptyFlowType()

const CTypeBase & uLang::SemanticTypeUtils::SkipEmptyFlowType ( const CTypeBase Type)

◆ SkipIdentityFlowType() [1/2]

const CTypeBase & uLang::SemanticTypeUtils::SkipIdentityFlowType ( const CFlowType FlowType,
ETypePolarity  Polarity,
const uint32_t  UploadedAtFnVersion 
)

◆ SkipIdentityFlowType() [2/2]

const CTypeBase & uLang::SemanticTypeUtils::SkipIdentityFlowType ( const CTypeBase Type,
ETypePolarity  Polarity,
const uint32_t  UploadedAtFnVersion 
)

◆ StripVariableAndConstraints() [1/2]

const CNormalType & uLang::SemanticTypeUtils::StripVariableAndConstraints ( const CNormalType Type)

◆ StripVariableAndConstraints() [2/2]

const CNormalType & uLang::SemanticTypeUtils::StripVariableAndConstraints ( const CNormalType Type,
ETypeConstraintFlags outConstraintFlags 
)

◆ Substitute()

const CTypeBase * uLang::SemanticTypeUtils::Substitute ( const CTypeBase Type,
ETypePolarity  Polarity,
const TArray< STypeVariableSubstitution > &  InstTypeVariables 
)

◆ VisitAllDefinitions()

void uLang::SemanticTypeUtils::VisitAllDefinitions ( const CTypeBase Type,
const CAstPackage VisitorPackage,
const TFunction< void(const CDefinition &, const CSymbol &)> &  Functor 
)