UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
BuildPatchState.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2#pragma once
3
4#include "CoreMinimal.h"
5#include "CoreTypes.h"
6
7class FString;
8class FText;
9
10namespace BuildPatchServices
11{
16 {
17 // The patch process is waiting for other installs
18 Queued = 0,
19
20 // The patch process is initializing
22
23 // The patch process is enumerating existing staged data
24 Resuming,
25
26 // The patch process is downloading patch data
27 Downloading,
28
29 // The patch process is installing files
30 Installing,
31
32 // The patch process is moving staged files to the install
33 MovingToInstall,
34
35 // The patch process is setting up attributes on the build
36 SettingAttributes,
37
38 // The patch process is verifying the build
39 BuildVerification,
40
41 // The patch process is cleaning temp files
42 CleanUp,
43
44 // The patch process is installing prerequisites
45 PrerequisitesInstall,
46
47 // A state to catch the UI when progress is 100% but UI still being displayed
49
50 // The process has been set paused
51 Paused,
52
53 // Holds the number of states, for array sizes
54 NUM_PROGRESS_STATES,
55 };
56
62 UE_DEPRECATED(4.21, "BuildPatchServices::StateToText(const EBuildPatchState& State) has been deprecated. It will no longer be supported by BuildPatchServices in the future.")
63 BUILDPATCHSERVICES_API const FText& StateToText(const EBuildPatchState& State);
64}
65
66static_assert((uint32)BuildPatchServices::EBuildPatchState::NUM_PROGRESS_STATES == 12, "Please add support for the extra values to the Lex functions below.");
67
68inline const TCHAR* LexToString(BuildPatchServices::EBuildPatchState State)
69{
70#define CASE_ENUM_TO_STR(Value) case BuildPatchServices::EBuildPatchState::Value: return TEXT(#Value)
71 switch (State)
72 {
75 CASE_ENUM_TO_STR(Resuming);
76 CASE_ENUM_TO_STR(Downloading);
77 CASE_ENUM_TO_STR(Installing);
78 CASE_ENUM_TO_STR(MovingToInstall);
79 CASE_ENUM_TO_STR(SettingAttributes);
80 CASE_ENUM_TO_STR(BuildVerification);
81 CASE_ENUM_TO_STR(CleanUp);
82 CASE_ENUM_TO_STR(PrerequisitesInstall);
85 default: return TEXT("InvalidOrMax");
86 }
87#undef CASE_ENUM_TO_STR
88}
89
90inline void LexFromString(BuildPatchServices::EBuildPatchState& Error, const TCHAR* Buffer)
91{
92#define RETURN_IF_EQUAL(Value) if (FCString::Stricmp(Buffer, TEXT(#Value)) == 0) { Error = BuildPatchServices::EBuildPatchState::Value; return; }
93 const TCHAR* const Prefix = TEXT("EBuildPatchState::");
94 const SIZE_T PrefixLen = FCString::Strlen(Prefix);
95 if (FCString::Strnicmp(Buffer, Prefix, PrefixLen) == 0)
96 {
98 }
101 RETURN_IF_EQUAL(Resuming);
102 RETURN_IF_EQUAL(Downloading);
103 RETURN_IF_EQUAL(Installing);
104 RETURN_IF_EQUAL(MovingToInstall);
105 RETURN_IF_EQUAL(SettingAttributes);
106 RETURN_IF_EQUAL(BuildVerification);
107 RETURN_IF_EQUAL(CleanUp);
108 RETURN_IF_EQUAL(PrerequisitesInstall);
111 // Did not match
112 Error = BuildPatchServices::EBuildPatchState::NUM_PROGRESS_STATES;
113 return;
114#undef RETURN_IF_EQUAL
115}
EGLSurface EGLint const EGLint EGLnsecsANDROID * values
Definition AndroidOpenGLFunctions.h:11
#define CASE_ENUM_TO_STR(Value)
#define RETURN_IF_EQUAL(Value)
#define UE_DEPRECATED(Version, Message)
Definition CoreMiscDefines.h:302
#define TEXT(x)
Definition Platform.h:1272
FPlatformTypes::SIZE_T SIZE_T
An unsigned integer the same size as a pointer, the same as UPTRINT.
Definition Platform.h:1150
FPlatformTypes::TCHAR TCHAR
Either ANSICHAR or WIDECHAR, depending on whether the platform supports wide characters or the requir...
Definition Platform.h:1135
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
const TCHAR * LexToString(EAnalyticsRecordEventMode Mode)
Definition IAnalyticsProvider.cpp:5
void LexFromString(EAudioFeature &OutFeature, const TCHAR *String)
Definition IOSAppDelegate.cpp:163
uint32_t uint32
Definition binka_ue_file_header.h:6
EBuildPatchState
Definition BuildPatchState.h:16
Definition Text.h:385
Definition BuildPatchFileConstructor.h:28
BUILDPATCHSERVICES_API const FText & StateToText(const EBuildPatchState &State)
static int32 Strlen(const CharType *String)
Definition CString.h:1047
static UE_FORCEINLINE_HINT int32 Strnicmp(const CharType *String1, const CharType *String2, SIZE_T Count)
Definition CString.h:1036