Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
AccessDetection.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "CoreTypes.h"
6#include "Misc/EnumClassFlags.h"
7
8namespace UE { namespace AccessDetection {
9
10enum class EType : uint32
11{
12 None = 0,
13 File = 1 << 0,
14 Ini = 1 << 1,
15 CVar = 1 << 2,
16};
18
20
21class FScope;
22
23namespace Private
24{
25 extern volatile int32 GNumLiveScopes;
26
29}
30
32{
33 // Note unsynchronized access is fine - we only need to see writes by current thread
34 if (Private::GNumLiveScopes > 0)
35 {
37 }
38}
39
40/** Detects access to global core systems while running deterministic code that should be isolated from the local environment */
41class FScope
42{
43public:
45 ~FScope() { Private::SetCurrentThreadScope(nullptr); }
46
48 EType GetAccesses() const { return AccessedTypes; }
49
50private:
52};
53
54#else
55
57
58#endif
59
60}}
#define WITH_EDITOR
Definition Build.h:7
#define ENUM_CLASS_FLAGS(Enum)
#define FORCEINLINE
Definition Platform.h:644
FORCEINLINE void ReportAccess(EType Type)
Definition Vector.h:40