7#include "Containers/Array.h"
189 bool WasCancelled =
false;
195 float CurrentMin = 0;
196 float CurrentMax = 1;
204 return CurrentMax - CurrentMin;
213 FProgressData Progress;
214 FText ProgressMessage;
215 int MaxMessageDepth = -1;
218 std::atomic<float> ProgressFraction = 0;
232 MaxMessageDepth = ScopeDepth;
237 MaxMessageDepth = -1;
260 FProgressData SavedProgressData;
281 Other.ProgressCancel =
nullptr;
288 ProgressCancel =
Other.ProgressCancel;
290 bEnded =
Other.bEnded;
291 Other.ProgressCancel =
nullptr;
391 return ProgressMessage;
396 if (MaxMessageDepth == -1 || Progress.ScopeDepth < MaxMessageDepth)
398 Progress.Message = Message;
400 ProgressMessage = Message;
409 ProgressFraction = Progress.SafeAdvance(ProgressFraction, Amount);
428 float Range = Progress.Range();
429 return Range > 0 ? (ProgressFraction - Progress.CurrentMin) / Range : 1;
bool bSuccess
Definition ConvexDecomposition3.cpp:819
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
UE::FPlatformRecursiveMutex FCriticalSection
Definition CriticalSection.h:53
const bool
Definition NetworkReplayStreaming.h:178
UE_INTRINSIC_CAST UE_REWRITE constexpr std::remove_reference_t< T > && MoveTemp(T &&Obj) noexcept
Definition UnrealTemplate.h:520
Definition ProgressCancel.h:258
FProgressScope(FProgressScope &&Other) noexcept
Definition ProgressCancel.h:279
void SetProgressTo(float NewProgressFrac)
Definition ProgressCancel.h:366
float GetDistanceTo(float TargetProgressFrac)
Definition ProgressCancel.h:337
FProgressScope(const FProgressScope &Other)=delete
~FProgressScope()
Definition ProgressCancel.h:297
GEOMETRYCORE_API void Done()
Definition ProgressCancel.cpp:73
FProgressScope & operator=(FProgressScope &&Other) noexcept
Definition ProgressCancel.h:284
FProgressScope()
Definition ProgressCancel.h:274
void AdvanceProgressToward(float TargetProgressFrac, float FractionToward)
Definition ProgressCancel.h:326
void AdvanceProgressBy(float Amount)
Definition ProgressCancel.h:313
FProgressScope & operator=(const FProgressScope &Other)=delete
float GetProgress()
Definition ProgressCancel.h:350
Definition ProgressCancel.h:187
void SetCurrentScopeProgressTo(float NewProgressFrac)
Definition ProgressCancel.h:447
bool Cancelled()
Definition ProgressCancel.h:243
void SetProgressMessage(const FText &Message)
Definition ProgressCancel.h:394
EMessageLevel
Definition ProgressCancel.h:455
void ClearMaxMessageDepth()
Definition ProgressCancel.h:235
static GEOMETRYCORE_API FProgressScope CreateScopeTo(FProgressCancel *ProgressCancel, float ProgressTo, const FText &Message=FText())
Definition ProgressCancel.cpp:55
float GetCurrentScopeProgress()
Definition ProgressCancel.h:426
FText GetProgressMessage() const
Definition ProgressCancel.h:388
TFunction< bool()> CancelF
Definition ProgressCancel.h:228
void AdvanceCurrentScopeProgressToward(float TargetProgressFrac, float FractionToward)
Definition ProgressCancel.h:417
void AdvanceCurrentScopeProgressBy(float Amount)
Definition ProgressCancel.h:407
void AddWarning(const FText &MessageText, EMessageLevel MessageLevel)
Definition ProgressCancel.h:477
float GetCurrentScopeDistanceTo(float TargetProgressFrac)
Definition ProgressCancel.h:436
float GetProgress() const
Definition ProgressCancel.h:383
void SetMaxMessageDepth(int32 ScopeDepth)
Definition ProgressCancel.h:230
TArray< FMessageInfo > Warnings
Definition ProgressCancel.h:482
Definition ScopeLock.h:141
Definition AndroidPlatformMisc.h:14
static RealType Lerp(const RealType A, const RealType B, RealType Alpha)
Definition MathUtil.h:422
static RealType Clamp(const RealType Value, const RealType ClampMin, const RealType ClampMax)
Definition MathUtil.h:222
static RealType Max(const RealType A, const RealType B)
Definition MathUtil.h:246
static RealType Min(const RealType A, const RealType B)
Definition MathUtil.h:271
EGeometryResultType
Definition ProgressCancel.h:80
Definition AdvancedWidgetsModule.cpp:13
static CORE_API FDateTime Now()
Definition DateTime.cpp:377
Definition ProgressCancel.h:471
FDateTime Timestamp
Definition ProgressCancel.h:474
FText MessageText
Definition ProgressCancel.h:472
EMessageLevel MessageLevel
Definition ProgressCancel.h:473
Definition ProgressCancel.h:34
FGeometryError()
Definition ProgressCancel.h:40
FGeometryError(int32 Code, const FText &MessageIn)
Definition ProgressCancel.h:45
FText Message
Definition ProgressCancel.h:36
FDateTime Timestamp
Definition ProgressCancel.h:37
TArray< unsigned char > CustomData
Definition ProgressCancel.h:38
int32 ErrorCode
Definition ProgressCancel.h:35
Definition ProgressCancel.h:99
bool HasFailed() const
Definition ProgressCancel.h:160
TArray< FGeometryWarning > Warnings
Definition ProgressCancel.h:102
void SetFailed()
Definition ProgressCancel.h:120
void AddWarning(FGeometryWarning Warning)
Definition ProgressCancel.h:152
void SetSuccess()
Definition ProgressCancel.h:123
EGeometryResultType Result
Definition ProgressCancel.h:100
FGeometryResult()
Definition ProgressCancel.h:105
FGeometryResult(EGeometryResultType ResultType)
Definition ProgressCancel.h:110
bool CheckAndSetCancelled(FProgressCancel *Progress)
Definition ProgressCancel.h:508
static FGeometryResult Failed()
Definition ProgressCancel.h:167
static FGeometryResult Cancelled()
Definition ProgressCancel.h:168
void UpdateResultType(EGeometryResultType NewType)
Definition ProgressCancel.h:115
bool HasResult() const
Definition ProgressCancel.h:165
void SetCancelled()
Definition ProgressCancel.h:121
void AddError(FGeometryError Error)
Definition ProgressCancel.h:144
TArray< FGeometryError > Errors
Definition ProgressCancel.h:101
Definition ProgressCancel.h:57
FGeometryWarning()
Definition ProgressCancel.h:64
FDateTime Timestamp
Definition ProgressCancel.h:60
int32 WarningCode
Definition ProgressCancel.h:58
FGeometryWarning(int32 Code, const FText &MessageIn)
Definition ProgressCancel.h:69
FText Message
Definition ProgressCancel.h:59
TArray< unsigned char > CustomData
Definition ProgressCancel.h:61