Files
UnrealEngineUWP/Engine/Source/Developer/TraceAnalysis/Private/Analysis/Engine.h
Johan Berg 377aa7c246 Remove usage of MessageLog in analysis.
Usage of MessageLog in non-ui threads is tricky and need to be carefully managed to avoid flushing memory on the wrong thread. With this change direct usage of MessageLog in the analysis engine is removed and replaced with a callback system which allows the user of TraceAnalysis to implement display of the messages themselves. In the case of InsightsManager this means queuing up the messages in analysis session and regularly polled from the UI thread.

#rb ionut.matasaru
#jira UE-185528

[CL 26086861 by Johan Berg in ue5-main branch]
2023-06-19 07:17:37 -04:00

37 lines
850 B
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "Containers/ContainersFwd.h"
#include "Trace/Analysis.h"
class FMessageLog;
namespace UE {
namespace Trace {
class IAnalyzer;
class FStreamReader;
////////////////////////////////////////////////////////////////////////////////
class FAnalysisEngine
{
public:
FAnalysisEngine(TArray<IAnalyzer*>&& Analyzers, FMessageDelegate&& InMessage);
~FAnalysisEngine();
void Begin();
void End();
bool OnData(FStreamReader& Reader);
private:
class FImpl;
FAnalysisEngine(const FAnalysisEngine&) = delete;
FAnalysisEngine(const FAnalysisEngine&&) = delete;
FAnalysisEngine operator = (const FAnalysisEngine&) = delete;
FAnalysisEngine operator = (const FAnalysisEngine&&) = delete;
FImpl* Impl;
};
} // namespace Trace
} // namespace UE