UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
Platform.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "Trace/Config.h"
6#include "Trace/Trace.h"
7
8#if TRACE_PRIVATE_MINIMAL_ENABLED
9
10namespace UE {
11namespace Trace {
12namespace Private {
13
15UPTRINT ThreadCreate(const ANSICHAR* Name, void (*Entry)());
19
33
35UPTRINT TcpSocketConnect(const ANSICHAR* Host, uint16 Port);
38bool TcpSocketHasData(UPTRINT Socket);
39
41int32 IoRead(UPTRINT Handle, void* Data, uint32 Size);
42bool IoWrite(UPTRINT Handle, const void* Data, uint32 Size);
44
46UPTRINT FileOpen(const ANSICHAR* Path);
47
49int32 GetLastErrorCode();
50bool GetErrorMessage(char* OutBuffer, uint32 BufferSize, int32 ErrorCode);
51
53#if !defined(TRACE_PRIVATE_HAS_THROTTLE)
54# define TRACE_PRIVATE_HAS_THROTTLE 0
55#endif
56
57#if TRACE_PRIVATE_HAS_THROTTLE
58# define THROTTLE_IMPL(x) ;
59# define THROTTLE_INL
60#else
61# define THROTTLE_IMPL(x) {x}
62# define THROTTLE_INL inline
63#endif
64
67
68#undef THROTTLE_INL
69#undef THROTTLE_IMPL
70
72struct FProfilerScope
73{
76
77#if TRACE_PRIVATE_FULL_ENABLED
78 FProfilerScope(const ANSICHAR* Label) { if (OnScopeBegin) { OnScopeBegin(Label); }}
80#else
81 FProfilerScope(const ANSICHAR* Label) {}
82#endif
83};
84
85} // namespace Private
86} // namespace Trace
87} // namespace UE
88
89#endif // TRACE_PRIVATE_MINIMAL_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
FPlatformTypes::ANSICHAR ANSICHAR
An ANSI character. Normally a signed type.
Definition Platform.h:1131
FPlatformTypes::uint64 uint64
A 64-bit unsigned integer.
Definition Platform.h:1117
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
@ Milliseconds
uint32 Size
Definition VulkanMemory.cpp:4034
uint16_t uint16
Definition binka_ue_file_header.h:7
uint32_t uint32
Definition binka_ue_file_header.h:6
@ Trace
Definition NetTraceConfig.h:23
Definition OverriddenPropertySet.cpp:45
void(const ANSICHAR *) OnScopeBeginFunc
Definition Trace.h:138
void(void) OnScopeEndFunc
Definition Trace.h:139
Definition AdvancedWidgetsModule.cpp:13