UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
LaneTrace.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#if !defined(NO_UE_INCLUDES)
6#include <Trace/Trace.h>
10#endif
11
13#if !defined(UE_LANETRACE_ENABLED)
14# define UE_LANETRACE_ENABLED CPUPROFILERTRACE_ENABLED && !UE_BUILD_SHIPPING
15#endif
16
17#if UE_LANETRACE_ENABLED
18# define LANETRACE_OFF_IMPL(...)
19# define UE_API IOSTOREHTTPCLIENT_API
20#else
21# define LANETRACE_OFF_IMPL(...) { return __VA_ARGS__ ; }
22# define UE_API inline
23#endif
24
33
34class FLaneTrace;
42
43
44
47{
48 FLanePostcode(const void* In) : Value(UPTRINT(In)) {}
51};
52
53class FLaneEstate;
59
60#undef LANETRACE_OFF_IMPL
61#undef UE_API
62
63
64
65#if UE_LANETRACE_ENABLED
66
69{
70public:
72 FLaneTraceScope() = default;
75 FLaneTraceScope& operator = (FLaneTraceScope&& Rhs);
76 void Change(uint32 Scope) const;
77
78private:
79 FLaneTraceScope(const FLaneTraceScope&) = delete;
80 FLaneTraceScope& operator = (const FLaneTraceScope&) = delete;
81 FLaneTrace* Lane = nullptr;
82};
83
86: Lane(InLane)
87{
88 LaneTrace_Enter(Lane, Scope);
89}
90
92inline FLaneTraceScope::~FLaneTraceScope()
93{
94 if (Lane)
95 {
97 }
98}
99
102{
103 Swap(Rhs.Lane, Lane);
104}
105
107inline FLaneTraceScope& FLaneTraceScope::operator = (FLaneTraceScope&& Rhs)
108{
109 Swap(Rhs.Lane, Lane);
110 return *this;
111}
112
114inline void FLaneTraceScope::Change(uint32 Scope) const
115{
116 LaneTrace_Change(Lane, Scope);
117}
118
119#else // UE_LANETRACE_ENABLED
120
122{
123public:
125 void Change(uint32) const {}
126};
127
128#endif // UE_LANETRACE_ENABLED
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition Platform.h:1125
FPlatformTypes::UPTRINT UPTRINT
An unsigned integer the same size as a pointer.
Definition Platform.h:1146
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
UE_API void LaneTrace_Leave(FLaneTrace *Lane) LANETRACE_OFF_IMPL()
UE_API uint32 LaneTrace_NewScope(const FAnsiStringView &Name) LANETRACE_OFF_IMPL(1)
UE_API void LaneTrace_LeaveAll(FLaneTrace *Lane) LANETRACE_OFF_IMPL()
UE_API FLaneTrace * LaneEstate_Lookup(FLaneEstate *Estate, FLanePostcode Postcode) LANETRACE_OFF_IMPL(nullptr)
UE_API FLaneEstate * LaneEstate_New(const FLaneTraceSpec &Spec) LANETRACE_OFF_IMPL(nullptr)
#define LANETRACE_OFF_IMPL(...)
Definition LaneTrace.h:21
UE_API FLaneTrace * LaneTrace_New(const FLaneTraceSpec &Spec) LANETRACE_OFF_IMPL(nullptr)
#define UE_API
Definition LaneTrace.h:22
UE_API void LaneEstate_Demolish(FLaneEstate *Estate, FLanePostcode Postcode) LANETRACE_OFF_IMPL()
UE_API void LaneTrace_Enter(FLaneTrace *Lane, uint32 ScopeId) LANETRACE_OFF_IMPL()
UE_API void LaneTrace_Change(FLaneTrace *Lane, uint32 ScopeId) LANETRACE_OFF_IMPL()
UE_API void LaneTrace_Delete(FLaneTrace *Lane) LANETRACE_OFF_IMPL()
UE_API void LaneEstate_Delete(FLaneEstate *Estate) LANETRACE_OFF_IMPL()
UE_API FLaneTrace * LaneEstate_Build(FLaneEstate *Estate, FLanePostcode Postcode) LANETRACE_OFF_IMPL(nullptr)
uint32_t uint32
Definition binka_ue_file_header.h:6
Definition LaneTrace.h:122
void Change(uint32) const
Definition LaneTrace.h:125
FLaneTraceScope(...)
Definition LaneTrace.h:124
FORCEINLINE UE_STRING_CLASS RhsType && Rhs
Definition String.cpp.inl:718
Definition LaneTrace.h:47
FLanePostcode(const void *In)
Definition LaneTrace.h:48
UPTRINT Value
Definition LaneTrace.h:50
FLanePostcode(UPTRINT In)
Definition LaneTrace.h:49
Definition LaneTrace.h:27
FAnsiStringView Group
Definition LaneTrace.h:29
FAnsiStringView Name
Definition LaneTrace.h:28
const void * Channel
Definition LaneTrace.h:30
int32 Weight
Definition LaneTrace.h:31