Navigation
Unreal Engine C++ API Reference > Runtime > CoreUObject > UObject
Inheritance Hierarchy
References
Module | CoreUObject |
Header | /Engine/Source/Runtime/CoreUObject/Public/UObject/Class.h |
Include | #include "UObject/Class.h" |
Syntax
class UEnum : public UField
Remarks
Reflection data for an enumeration.
Variables
Type | Name | Description | |
---|---|---|---|
![]() |
ECppForm | CppForm | How the enum was originally defined. |
![]() |
FString | CppType | This will be the true type of the enum as a string, e.g. "ENamespacedEnum::InnerType" or "ERegularEnum" or "EEnumClass" |
![]() |
FEnumDisplayNameFn | EnumDisplayNameFn | Pointer to function used to look up the enum's display name. |
![]() |
EEnumFlags | EnumFlags | Enum flags. |
![]() |
FName | EnumPackage | Package name this enum was in when its names were being added to the primary list |
![]() |
TArray< TPair< FName, int64 > > | Names | List of pairs of all enum names and values. |
Constructors
Type | Name | Description | |
---|---|---|---|
![]() |
COREUOBJECT_API | UEnum
(
FVTableHelper& Helper |
DO NOT USE. This constructor is for internal usage only for hot-reload purposes. |
![]() |
UEnum
(
const FObjectInitializer& ObjectInitialzer |
Functions
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
void | __DefaultConstructor
(
const FObjectInitializer& X |
|
![]() ![]() |
UObject * | __VTableCtorCaller
(
FVTableHelper& Helper |
|
![]() |
void | Adds the Names in this enum to the primary AllEnumNames list | |
![]() ![]() |
bool | Tests if the enum contains a MAX value | |
![]() ![]() |
bool | FindAuthoredNameStringByValue
(
FString& Out, |
Looks for a display name with a given value and returns true and writes the unlocalized logical name to Out if one was found |
![]() ![]() |
bool | FindDisplayNameTextByValue
(
FText& Out, |
Looks for a display name with a given value and returns true and writes the name to Out if one was found |
![]() ![]() |
bool | FindNameStringByValue
(
FString& Out, |
Looks for a name with a given value and returns true and writes the name to Out if one was found |
![]() ![]() |
FString | Find the longest common prefix of all items in the enumeration. | |
![]() ![]() ![]() |
FString | GenerateFullEnumName
(
const TCHAR* InEnumName |
Generates full name including EnumName:: given enum name. |
![]() ![]() ![]() |
FString | GetAuthoredNameStringByIndex
(
int32 InIndex |
Returns the unlocalized logical name originally assigned to the enum at creation. |
![]() ![]() |
FString | GetAuthoredNameStringByValue
(
int64 InValue |
Version of GetAuthoredNameByIndex that takes a value instead |
![]() ![]() |
ECppForm | GetCppForm () |
Returns the type of enum: whether it's a regular enum, namespaced enum or C++11 enum class. |
![]() ![]() ![]() |
FText | GetDisplayNameTextByIndex
(
int32 InIndex |
Finds the localized display name or native display name as a fallback. |
![]() ![]() |
FText | GetDisplayNameTextByValue
(
int64 InValue |
Version of GetDisplayNameTextByIndex that takes a value instead |
![]() ![]() |
FText | GetDisplayValueAsText
(
const EnumType EnumeratorValue |
|
![]() ![]() |
FText | GetDisplayValueAsText
(
const TEnumAsByte< EnumType > EnumeratorValue |
|
![]() ![]() |
FText | GetDisplayValueAsText
(
const TCHAR* EnumPath, |
|
![]() ![]() |
FText | GetDisplayValueAsText
(
const TCHAR* EnumPath, |
|
![]() ![]() |
void | GetDisplayValueAsText
(
const EnumType EnumeratorValue, |
|
![]() ![]() |
void | GetDisplayValueAsText
(
const TCHAR* EnumPath, |
|
![]() ![]() |
int32 | GetIndexByName
(
FName InName, |
Gets index of name in enum, returns INDEX_NONE and optionally errors when name is not found. |
![]() ![]() |
int32 | GetIndexByNameString
(
const FString& SearchString, |
Gets index of name in enum, returns INDEX_NONE and optionally errors when name is not found. |
![]() ![]() |
int32 | GetIndexByValue
(
int64 InValue |
Index is the internal index into the Enum array, and is not useful outside of the Enum system Value is the value set in the Enum Class in C++ or Blueprint Enums can be sparse, which means that not every valid Index is a proper Value, and they are not necessarily equal It is not safe to cast an Index to a Enum Class, always do that with a Value instead Gets the internal index for an enum value. |
![]() ![]() |
int64 | Gets max value of Enum. Defaults to zero if there are no entries. | |
![]() ![]() |
FString | GetMetaData
(
const TCHAR* Key, |
Return the metadata value associated with the specified key. |
![]() ![]() |
FName | GetNameByIndex
(
int32 Index |
Gets enum name by index in Names array. |
![]() ![]() |
FName | GetNameByValue
(
int64 InValue |
Gets enum name by value. Returns NAME_None if value is not found. |
![]() ![]() |
FString | GetNameStringByIndex
(
int32 InIndex |
Returns the short name at the enum index, returns empty string if invalid |
![]() ![]() |
FString | GetNameStringByValue
(
int64 InValue |
Returns the short name matching the enum Value, returns empty string if invalid |
![]() ![]() |
FText | GetToolTipTextByIndex
(
int32 NameIndex |
Finds the localized tooltip or native tooltip as a fallback. |
![]() ![]() |
void | GetValueAsName
(
const EnumType EnumeratorValue, |
|
![]() ![]() |
FName | GetValueAsName
(
const TEnumAsByte< EnumType > EnumeratorValue |
|
![]() ![]() |
FName | GetValueAsName
(
const EnumType EnumeratorValue |
|
![]() ![]() |
void | GetValueAsString
(
const TCHAR* EnumPath, |
|
![]() ![]() |
void | GetValueAsString
(
const EnumType EnumeratorValue, |
|
![]() ![]() |
FString | GetValueAsString
(
const TCHAR* EnumPath, |
|
![]() ![]() |
FString | GetValueAsString
(
const TCHAR* EnumPath, |
|
![]() ![]() |
FString | GetValueAsString
(
const TEnumAsByte< EnumType > EnumeratorValue |
|
![]() ![]() |
FString | GetValueAsString
(
const EnumType EnumeratorValue |
|
![]() ![]() |
int64 | GetValueByIndex
(
int32 Index |
Gets enum value by index in Names array. Asserts on invalid index |
![]() ![]() |
int64 | GetValueByName
(
FName InName, |
Gets enum value by name, returns INDEX_NONE and optionally errors when name is not found. |
![]() ![]() |
int64 | GetValueByNameString
(
const FString& SearchString, |
Gets enum value by name, returns INDEX_NONE and optionally errors when name is not found. |
![]() ![]() |
FString | GetValueOrBitfieldAsString
(
const TEnumAsByte< EnumType > EnumeratorValue |
TEnumAsByte produces a warning if you use it with EnumClass, so this UE_REQUIRES keeps this overload from being matched in that case |
![]() ![]() |
FString | GetValueOrBitfieldAsString
(
const EnumType EnumeratorValue |
|
![]() ![]() |
FString | GetValueOrBitfieldAsString
(
const IntegralType EnumeratorValue |
|
![]() ![]() |
FString | GetValueOrBitfieldAsString
(
const TCHAR* EnumPath, |
|
![]() ![]() |
FString | GetValueOrBitfieldAsString
(
const TCHAR* EnumPath, |
|
![]() ![]() |
void | GetValueOrBitfieldAsString
(
const IntegralType EnumeratorValue, |
|
![]() ![]() |
void | GetValueOrBitfieldAsString
(
const TCHAR* EnumPath, |
|
![]() ![]() |
void | GetValueOrBitfieldAsString
(
const EnumType EnumeratorValue, |
|
![]() ![]() |
FString | GetValueOrBitfieldAsString
(
int64 InValue |
If the enumeration is declared as UENUM(Flags), returns a string of the form A | B | C representing set bits A, B, and C. |
![]() ![]() |
bool | HasAnyEnumFlags
(
EEnumFlags InFlags |
|
![]() ![]() |
bool | HasMetaData
(
const TCHAR* Key, |
Wrapper method for easily determining whether this enum has metadata associated with it. |
![]() ![]() |
bool | IsFullEnumName
(
const TCHAR* InEnumName |
Checks if a enum name is fully qualified name. |
![]() ![]() |
bool | IsValidEnumName
(
FName InName |
Checks if enum has entry with given name. Includes autogenerated _MAX entry. |
![]() ![]() |
bool | IsValidEnumValue
(
int64 InValue |
Checks if enum has entry with given value. Includes autogenerated _MAX entry. |
![]() ![]() |
int64 | LookupEnumName
(
FName PackageName, |
Searches the list of all enum value names for the specified name |
![]() ![]() |
int64 | LookupEnumNameSlow
(
FName PackageName, |
Searches the list of all enum value names for the specified name |
![]() ![]() |
int32 | NumEnums () |
|
![]() ![]() |
int64 | ParseEnum
(
const TCHAR*& Str |
Parses the passed in string for a name, then searches for that name in any Enum (in any package) |
![]() ![]() |
void | RemoveMetaData
(
const TCHAR* Key, |
Remove given key meta data |
![]() |
void | Removes the Names in this enum from the primary AllEnumNames list | |
![]() ![]() ![]() |
int64 | ResolveEnumerator
(
FArchive& Ar, |
Try to update an out-of-date enum index after an enum changes at runtime |
![]() |
void | SetEnumDisplayNameFn
(
FEnumDisplayNameFn InEnumDisplayNameFn |
Associate a function for looking up Enum display names by index, only intended for use by generated code |
![]() |
void | SetEnumFlags
(
EEnumFlags FlagsToSet |
|
![]() ![]() |
bool | Sets the array of enums. | |
![]() ![]() |
void | SetMetaData
(
const TCHAR* Key, |
Set the metadata value associated with the specified key. |
![]() ![]() |
UClass * | StaticClass () |
Returns a UClass object representing this class at runtime |
![]() ![]() |
EClassCastFlags | Returns the static cast flags for this class | |
![]() ![]() |
const TCHAR * | Returns the package this class belongs in | |
![]() ![]() |
void |
Overridden from UObject
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
void | BeginDestroy () |
Called before destroying the object. |
![]() ![]() |
void | Handles reading, writing, and reference collecting using FArchive. |
Operators
Type | Name | Description | |
---|---|---|---|
![]() |
void | operator delete
(
void* InMem |
Eliminate V1062 warning from PVS-Studio while keeping MSVC and Clang happy. |
![]() |
void * | operator new
(
const size_t InSize, |
For internal use only; use StaticConstructObject() to create new objects. |
![]() |
void * | operator new
(
const size_t InSize, |
For internal use only; use StaticConstructObject() to create new objects. |
Enums
Type | Name | Description | |
---|---|---|---|
![]() |
ECppForm | How this enum is declared in C++, affects the internal naming of enum values |
Typedefs
Constants
Name | Description |
---|---|
AllEnumNames | Global list of all value names used by all enums in memory, used for property text import |
AllEnumNamesLock | Lock to be taken when accessing AllEnumNames |
StaticClassFlags | Bitwise union of EClassFlags pertaining to this class. |
Deprecated Functions
Type | Name | Description | |
---|---|---|---|
![]() |
void | AddNamesToMasterList is deprecated, please use AddNamesToPrimaryList instead. | |
![]() ![]() |
int64 | LookupEnumName
(
FName TestName, |
LookupEnumName that takes only enum name is deprecated. Please use the version of this function that also takes enum package name. |
![]() ![]() |
int64 | LookupEnumNameSlow
(
const TCHAR* InTestShortName, |
LookupEnumNameSlow that takes only enum name is deprecated. Please use the version of this function that also takes enum package name. |
![]() |
void | RemoveNamesFromMasterList is deprecated, please use RemoveNamesFromPrimaryList instead. |