Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
PlatformFileManager.h
Go to the documentation of this file.
1
// Copyright Epic Games, Inc. All Rights Reserved.
2
3
#
pragma
once
4
5
#
include
"CoreFwd.h"
6
#
include
"CoreTypes.h"
7
#
include
"Templates/Atomic.h"
8
9
#
ifndef
USE_ATOMIC_PLATFORM_FILE
10
#
define
USE_ATOMIC_PLATFORM_FILE
(
WITH_EDITOR
)
11
#
endif
12
13
/**
14
* Platform File chain manager.
15
**/
16
class
FPlatformFileManager
17
{
18
#
if
USE_ATOMIC_PLATFORM_FILE
19
/** Currently used platform file. */
20
TAtomic
<
class
IPlatformFile
*>
TopmostPlatformFile
;
21
#
else
22
/** Currently used platform file. */
23
class
IPlatformFile
*
TopmostPlatformFile
;
24
#
endif
25
26
public
:
27
28
/** Constructor. */
29
FPlatformFileManager
( );
30
31
/**
32
* Gets the currently used platform file.
33
*
34
* @return Reference to the currently used platform file.
35
*/
36
IPlatformFile
&
GetPlatformFile
( );
37
38
/**
39
* Sets the current platform file.
40
*
41
* @param NewTopmostPlatformFile Platform file to be used.
42
*/
43
void
SetPlatformFile
(
IPlatformFile
& NewTopmostPlatformFile );
44
45
/**
46
* Finds a platform file in the chain of active platform files.
47
*
48
* @param Name of the platform file.
49
* @return Pointer to the active platform file or nullptr if the platform file was not found.
50
*/
51
IPlatformFile
*
FindPlatformFile
(
const
TCHAR* Name );
52
53
/**
54
* Creates a new platform file instance.
55
*
56
* @param Name of the platform file to create.
57
* @return Platform file instance of the platform file type was found, nullptr otherwise.
58
*/
59
IPlatformFile
*
GetPlatformFile
(
const
TCHAR* Name );
60
61
/**
62
* calls Tick on the platform files in the TopmostPlatformFile chain
63
*/
64
void
TickActivePlatformFile
();
65
66
/**
67
* Performs additional initialization when the new async IO is enabled.
68
*/
69
void
InitializeNewAsyncIO
();
70
71
/**
72
* Gets FPlatformFileManager Singleton.
73
*/
74
static
FPlatformFileManager
&
Get
( );
75
76
/**
77
* Removes the specified file wrapper from the platform file wrapper chain.
78
*
79
* THIS IS EXTREMELY DANGEROUS AFTER THE ENGINE HAS BEEN INITIALIZED AS WE MAY BE MODIFYING
80
* THE WRAPPER CHAIN WHILE THINGS ARE BEING LOADED
81
*
82
* @param The platform file to remove.
83
*/
84
void
RemovePlatformFile
(
IPlatformFile
* PlatformFileToRemove);
85
86
/**
87
* Inserts a new platform file into the platform file wrapper chain.
88
* The file is inserted before NewPlatformFile->GetLowerLevel().
89
*
90
* THIS IS EXTREMELY DANGEROUS AFTER THE ENGINE HAS BEEN INITIALIZED AS WE MAY BE MODIFYING
91
* THE WRAPPER CHAIN WHILE THINGS ARE BEING LOADED
92
*
93
* @param The platform file to insert.
94
* @return true if the platform file was inserted.
95
*/
96
bool
InsertPlatformFile
(
IPlatformFile
* NewPlatformFile);
97
};
WITH_EDITOR
#define WITH_EDITOR
Definition
Build.h:7
USE_ATOMIC_PLATFORM_FILE
#define USE_ATOMIC_PLATFORM_FILE
Definition
PlatformFileManager.h:10
FPlatformFileManager
Definition
PlatformFileManager.h:17
FPlatformFileManager::FPlatformFileManager
FPlatformFileManager()
FPlatformFileManager::TickActivePlatformFile
void TickActivePlatformFile()
FPlatformFileManager::FindPlatformFile
IPlatformFile * FindPlatformFile(const TCHAR *Name)
FPlatformFileManager::InsertPlatformFile
bool InsertPlatformFile(IPlatformFile *NewPlatformFile)
FPlatformFileManager::TopmostPlatformFile
class IPlatformFile * TopmostPlatformFile
Definition
PlatformFileManager.h:23
FPlatformFileManager::InitializeNewAsyncIO
void InitializeNewAsyncIO()
FPlatformFileManager::SetPlatformFile
void SetPlatformFile(IPlatformFile &NewTopmostPlatformFile)
FPlatformFileManager::RemovePlatformFile
void RemovePlatformFile(IPlatformFile *PlatformFileToRemove)
FPlatformFileManager::GetPlatformFile
IPlatformFile & GetPlatformFile()
FPlatformFileManager::GetPlatformFile
IPlatformFile * GetPlatformFile(const TCHAR *Name)
FPlatformFileManager::Get
static FPlatformFileManager & Get()
IPlatformFile
Definition
GenericPlatformFile.h:208
Downloads
ArkServerAPI_NEW
ASA
AsaApi
AsaApi
Core
Public
API
UE
HAL
PlatformFileManager.h
Generated by
1.10.0