Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
FFeedbackContext Class Reference

#include <FeedbackContext.h>

+ Inheritance diagram for FFeedbackContext:
+ Collaboration diagram for FFeedbackContext:

Public Member Functions

virtual void Serialize (const TCHAR *V, ELogVerbosity::Type Verbosity, const FName &Category) override
 
virtual void Serialize (const TCHAR *V, ELogVerbosity::Type Verbosity, const FName &Category, double Time) override
 
virtual void SerializeRecord (const UE::FLogRecord &Record) override
 
virtual bool YesNof (const FText &Question)
 
virtual bool ReceivedUserCancel ()
 
FORCEINLINE const FSlowTaskStackGetScopeStack () const
 
void BeginSlowTask (const FText &Task, bool ShowProgressDialog, bool bShowCancelButton=false)
 
void UpdateProgress (int32 Numerator, int32 Denominator)
 
void StatusUpdate (int32 Numerator, int32 Denominator, const FText &StatusText)
 
void StatusForceUpdate (int32 Numerator, int32 Denominator, const FText &StatusText)
 
void EndSlowTask ()
 
virtual FContextSupplierGetContext () const
 
virtual void SetContext (FContextSupplier *InContext)
 
virtual TWeakPtr< class SBuildProgressWidgetShowBuildProgressWindow ()
 
virtual void CloseBuildProgressWindow ()
 
 FFeedbackContext ()
 
virtual ~FFeedbackContext ()
 
void GetWarnings (TArray< FString > &OutWarnings) const
 
int32 GetNumWarnings () const
 
void GetErrors (TArray< FString > &OutErrors) const
 
int32 GetNumErrors () const
 
void GetErrorsAndWarningsAndEmpty (TArray< FString > &OutWarningsAndErrors)
 
void ClearWarningsAndErrors ()
 
- Public Member Functions inherited from FOutputDevice
 FOutputDevice ()
 
 FOutputDevice (FOutputDevice &&)=default
 
 FOutputDevice (const FOutputDevice &)=default
 
FOutputDeviceoperator= (FOutputDevice &&)=default
 
FOutputDeviceoperator= (const FOutputDevice &)=default
 
virtual ~FOutputDevice ()=default
 
virtual void Serialize (const TCHAR *V, ELogVerbosity::Type Verbosity, const FName &Category)=0
 
virtual void Serialize (const TCHAR *V, ELogVerbosity::Type Verbosity, const FName &Category, const double Time)
 
virtual void Flush ()
 
virtual void TearDown ()
 
void SetSuppressEventTag (bool bInSuppressEventTag)
 
FORCEINLINE bool GetSuppressEventTag () const
 
void SetAutoEmitLineTerminator (bool bInAutoEmitLineTerminator)
 
FORCEINLINE bool GetAutoEmitLineTerminator () const
 
virtual void Dump (class FArchive &Ar)
 
virtual bool IsMemoryOnly () const
 
virtual bool CanBeUsedOnAnyThread () const
 
virtual bool CanBeUsedOnMultipleThreads () const
 
virtual bool CanBeUsedOnPanicThread () const
 
void Log (const TCHAR *S)
 
void Log (ELogVerbosity::Type Verbosity, const TCHAR *S)
 
void Log (const FName &Category, ELogVerbosity::Type Verbosity, const TCHAR *Str)
 
void Log (const FString &S)
 
void Log (const FText &S)
 
void Log (ELogVerbosity::Type Verbosity, const FString &S)
 
void Log (const FName &Category, ELogVerbosity::Type Verbosity, const FString &S)
 
template<typename FmtType >
void Logf (const FmtType &Fmt)
 
template<typename FmtType , typename... Types>
FORCEINLINE void Logf (const FmtType &Fmt, Types... Args)
 
template<typename FmtType , typename... Types>
FORCEINLINE void Logf (ELogVerbosity::Type Verbosity, const FmtType &Fmt, Types... Args)
 
template<typename FmtType , typename... Types>
FORCEINLINE void CategorizedLogf (const FName &Category, ELogVerbosity::Type Verbosity, const FmtType &Fmt, Types... Args)
 

Public Attributes

bool TreatWarningsAsErrors = false
 

Protected Member Functions

virtual void StartSlowTask (const FText &Task, bool bShowCancelButton=false)
 
virtual void FinalizeSlowTask ()
 
virtual void ProgressReported (const float TotalProgressInterp, FText DisplayMessage)
 
virtual bool IsPlayingInEditor () const
 
void FormatLine (FStringBuilderBase &Out, const TCHAR *V, ELogVerbosity::Type Verbosity, const FName &Category, double Time, ELogVerbosity::Type *OutVerbosity=nullptr) const
 
void FormatRecordLine (FStringBuilderBase &Out, const UE::FLogRecord &Record, ELogVerbosity::Type *OutVerbosity=nullptr) const
 
const TSharedPtr< FSlowTaskStack > & GetScopeStackSharedPtr () const
 
void RequestUpdateUI (bool bForceUpdate=false)
 
void UpdateUI ()
 
void AddWarning (const FString &InWarning)
 
void AddWarning (FString &&InWarning)
 
void AddError (const FString &InError)
 
void AddError (FString &&InError)
 

Protected Attributes

friend FSlowTask
 
FSlowTaskStack ScopeStack
 
TSharedPtr< FSlowTaskStackScopeStackSharedPtr
 
TArray< TUniquePtr< FSlowTask > > LegacyAPIScopes
 
- Protected Attributes inherited from FOutputDevice
bool bSuppressEventTag
 
bool bAutoEmitLineTerminator
 

Private Member Functions

void AddToHistory (const TCHAR *V, ELogVerbosity::Type Verbosity, const FName &Category, double Time)
 
void AddRecordToHistory (const UE::FLogRecord &Record)
 
 FFeedbackContext (const FFeedbackContext &)
 
FFeedbackContextoperator= (const FFeedbackContext &)
 

Private Attributes

TArray< FStringWarnings
 
TArray< FStringErrors
 
FCriticalSection WarningsAndErrorsCritical
 

Detailed Description

A context for displaying modal warning messages.

Definition at line 26 of file FeedbackContext.h.

Constructor & Destructor Documentation

◆ FFeedbackContext() [1/2]

FFeedbackContext::FFeedbackContext ( )

◆ ~FFeedbackContext()

virtual FFeedbackContext::~FFeedbackContext ( )
virtual

◆ FFeedbackContext() [2/2]

FFeedbackContext::FFeedbackContext ( const FFeedbackContext & )
private

Member Function Documentation

◆ AddError() [1/2]

void FFeedbackContext::AddError ( const FString & InError)
inlineprotected

Adds a new error message to errors history.

Parameters
InWarningError message

Definition at line 202 of file FeedbackContext.h.

+ Here is the call graph for this function:

◆ AddError() [2/2]

void FFeedbackContext::AddError ( FString && InError)
inlineprotected

Definition at line 207 of file FeedbackContext.h.

+ Here is the call graph for this function:

◆ AddRecordToHistory()

void FFeedbackContext::AddRecordToHistory ( const UE::FLogRecord & Record)
private

◆ AddToHistory()

void FFeedbackContext::AddToHistory ( const TCHAR * V,
ELogVerbosity::Type Verbosity,
const FName & Category,
double Time )
private

◆ AddWarning() [1/2]

void FFeedbackContext::AddWarning ( const FString & InWarning)
inlineprotected

Adds a new warning message to warnings history.

Parameters
InWarningWarning message

Definition at line 187 of file FeedbackContext.h.

+ Here is the call graph for this function:

◆ AddWarning() [2/2]

void FFeedbackContext::AddWarning ( FString && InWarning)
inlineprotected

Definition at line 192 of file FeedbackContext.h.

+ Here is the call graph for this function:

◆ BeginSlowTask()

void FFeedbackContext::BeginSlowTask ( const FText & Task,
bool ShowProgressDialog,
bool bShowCancelButton = false )

◆ ClearWarningsAndErrors()

void FFeedbackContext::ClearWarningsAndErrors ( )
inline

Clears all history

Definition at line 132 of file FeedbackContext.h.

+ Here is the call graph for this function:

◆ CloseBuildProgressWindow()

virtual void FFeedbackContext::CloseBuildProgressWindow ( )
inlinevirtual

Definition at line 95 of file FeedbackContext.h.

◆ EndSlowTask()

void FFeedbackContext::EndSlowTask ( )

◆ FinalizeSlowTask()

virtual void FFeedbackContext::FinalizeSlowTask ( )
inlineprotectedvirtual

Called to destroy a slow task

Definition at line 71 of file FeedbackContext.h.

◆ FormatLine()

void FFeedbackContext::FormatLine ( FStringBuilderBase & Out,
const TCHAR * V,
ELogVerbosity::Type Verbosity,
const FName & Category,
double Time,
ELogVerbosity::Type * OutVerbosity = nullptr ) const
protected

◆ FormatRecordLine()

void FFeedbackContext::FormatRecordLine ( FStringBuilderBase & Out,
const UE::FLogRecord & Record,
ELogVerbosity::Type * OutVerbosity = nullptr ) const
protected

◆ GetContext()

virtual FContextSupplier * FFeedbackContext::GetContext ( ) const
inlinevirtual

Reimplemented in FFeedbackContextAnsi.

Definition at line 90 of file FeedbackContext.h.

◆ GetErrors()

void FFeedbackContext::GetErrors ( TArray< FString > & OutErrors) const
inline

Gets errors history

Definition at line 114 of file FeedbackContext.h.

+ Here is the call graph for this function:

◆ GetErrorsAndWarningsAndEmpty()

void FFeedbackContext::GetErrorsAndWarningsAndEmpty ( TArray< FString > & OutWarningsAndErrors)
inline

Gets all errors and warnings and clears the history

Definition at line 125 of file FeedbackContext.h.

+ Here is the call graph for this function:

◆ GetNumErrors()

int32 FFeedbackContext::GetNumErrors ( ) const
inline

Definition at line 119 of file FeedbackContext.h.

◆ GetNumWarnings()

int32 FFeedbackContext::GetNumWarnings ( ) const
inline

Definition at line 108 of file FeedbackContext.h.

◆ GetScopeStack()

FORCEINLINE const FSlowTaskStack & FFeedbackContext::GetScopeStack ( ) const
inline

Public const access to the current state of the scope stack

Definition at line 45 of file FeedbackContext.h.

◆ GetScopeStackSharedPtr()

const TSharedPtr< FSlowTaskStack > & FFeedbackContext::GetScopeStackSharedPtr ( ) const
inlineprotected

Definition at line 166 of file FeedbackContext.h.

◆ GetWarnings()

void FFeedbackContext::GetWarnings ( TArray< FString > & OutWarnings) const
inline

Gets warnings history

Definition at line 103 of file FeedbackContext.h.

+ Here is the call graph for this function:

◆ IsPlayingInEditor()

virtual bool FFeedbackContext::IsPlayingInEditor ( ) const
protectedvirtual

Called to check whether we are playing in editor when starting a slow task

◆ operator=()

FFeedbackContext & FFeedbackContext::operator= ( const FFeedbackContext & )
private

◆ ProgressReported()

virtual void FFeedbackContext::ProgressReported ( const float TotalProgressInterp,
FText DisplayMessage )
inlineprotectedvirtual

Called when some progress has occurred

Parameters
TotalProgressInterp[0..1] Value indicating the total progress of the slow task
DisplayMessageThe message to display on the slow task

Definition at line 81 of file FeedbackContext.h.

◆ ReceivedUserCancel()

virtual bool FFeedbackContext::ReceivedUserCancel ( )
inlinevirtual

Whether or not the user has canceled out of the progress dialog (i.e. the ongoing slow task or the last one that ran). The user cancel flag is reset when starting a new root slow task.

Definition at line 42 of file FeedbackContext.h.

◆ RequestUpdateUI()

void FFeedbackContext::RequestUpdateUI ( bool bForceUpdate = false)
protected

Ask that the UI be updated as a result of the scope stack changing

◆ Serialize() [1/2]

virtual void FFeedbackContext::Serialize ( const TCHAR * V,
ELogVerbosity::Type Verbosity,
const FName & Category )
overridevirtual

◆ Serialize() [2/2]

virtual void FFeedbackContext::Serialize ( const TCHAR * V,
ELogVerbosity::Type Verbosity,
const FName & Category,
double Time )
overridevirtual

◆ SerializeRecord()

virtual void FFeedbackContext::SerializeRecord ( const UE::FLogRecord & Record)
overridevirtual

◆ SetContext()

virtual void FFeedbackContext::SetContext ( FContextSupplier * InContext)
inlinevirtual

Reimplemented in FFeedbackContextAnsi.

Definition at line 91 of file FeedbackContext.h.

◆ ShowBuildProgressWindow()

virtual TWeakPtr< class SBuildProgressWidget > FFeedbackContext::ShowBuildProgressWindow ( )
inlinevirtual

Shows/Closes Special Build Progress dialogs

Definition at line 94 of file FeedbackContext.h.

◆ StartSlowTask()

virtual void FFeedbackContext::StartSlowTask ( const FText & Task,
bool bShowCancelButton = false )
inlineprotectedvirtual

Called to create a slow task

Definition at line 63 of file FeedbackContext.h.

◆ StatusForceUpdate()

void FFeedbackContext::StatusForceUpdate ( int32 Numerator,
int32 Denominator,
const FText & StatusText )

◆ StatusUpdate()

void FFeedbackContext::StatusUpdate ( int32 Numerator,
int32 Denominator,
const FText & StatusText )

◆ UpdateProgress()

void FFeedbackContext::UpdateProgress ( int32 Numerator,
int32 Denominator )

◆ UpdateUI()

void FFeedbackContext::UpdateUI ( )
protected

Update the UI as a result of the scope stack changing

◆ YesNof()

virtual bool FFeedbackContext::YesNof ( const FText & Question)
virtual

Ask the user a binary question, returning their answer

Reimplemented in FFeedbackContextAnsi.

Member Data Documentation

◆ Errors

TArray<FString> FFeedbackContext::Errors
private

Errors history

Definition at line 149 of file FeedbackContext.h.

◆ FSlowTask

friend FFeedbackContext::FSlowTask
protected

Definition at line 155 of file FeedbackContext.h.

◆ LegacyAPIScopes

TArray<TUniquePtr<FSlowTask> > FFeedbackContext::LegacyAPIScopes
protected

Definition at line 175 of file FeedbackContext.h.

◆ ScopeStack

FSlowTaskStack FFeedbackContext::ScopeStack
protected

Stack of pointers to feedback scopes that are currently open

Definition at line 158 of file FeedbackContext.h.

◆ ScopeStackSharedPtr

TSharedPtr<FSlowTaskStack> FFeedbackContext::ScopeStackSharedPtr
mutableprotected

Points to the ScopeStack above when initialized - this is because Slate wants a TSharedPtr, but we don't want to allocate

Definition at line 164 of file FeedbackContext.h.

◆ TreatWarningsAsErrors

bool FFeedbackContext::TreatWarningsAsErrors = false

Definition at line 97 of file FeedbackContext.h.

◆ Warnings

TArray<FString> FFeedbackContext::Warnings
private

Warnings history

Definition at line 147 of file FeedbackContext.h.

◆ WarningsAndErrorsCritical

FCriticalSection FFeedbackContext::WarningsAndErrorsCritical
mutableprivate

Guard for the errors and warnings history

Definition at line 151 of file FeedbackContext.h.


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