Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
NameAsStringIndexProxyArchive.h
Go to the documentation of this file.
1
// Copyright Epic Games, Inc. All Rights Reserved.
2
3
#
pragma
once
4
5
#
include
"Containers/Array.h"
6
#
include
"Containers/Set.h"
7
#
include
"CoreTypes.h"
8
#
include
"Serialization/ArchiveProxy.h"
9
#
include
"UObject/NameTypes.h"
10
11
class
FArchive
;
12
13
/**
14
* Implements a proxy archive that serializes FNames as string data or an index (if the same name is repeated).
15
*/
16
struct
FNameAsStringIndexProxyArchive
:
public
FArchiveProxy
17
{
18
/** When FName is first encountered, it is added to the table and saved as a string, otherwise, its index is written. Indices can be looked up from this TSet since it is not compacted. */
19
TSet
<
FName
>
NamesSeenOnSave
;
20
21
/** Table of names that is populated as the archive is being loaded. */
22
TArray
<
FName
>
NamesLoaded
;
23
24
/**
25
* Creates and initializes a new instance.
26
*
27
* @param InInnerArchive The inner archive to proxy.
28
*/
29
FNameAsStringIndexProxyArchive
(
FArchive
& InInnerArchive)
30
:
FArchiveProxy
(
InInnerArchive
)
31
{ }
32
33
/**
34
* Serialize the given FName as an FString or an index (if we encountered it again)
35
*/
36
virtual
FArchive
& operator<<(
FName
& N);
37
};
FArchive
Definition
Archive.h:1125
FArchiveProxy
Definition
ArchiveProxy.h:15
FArchiveProxy::FArchiveProxy
FArchiveProxy(FArchive &InInnerArchive)
FName
Definition
NameTypes.h:601
FNameAsStringIndexProxyArchive
Definition
NameAsStringIndexProxyArchive.h:17
FNameAsStringIndexProxyArchive::NamesSeenOnSave
TSet< FName > NamesSeenOnSave
Definition
NameAsStringIndexProxyArchive.h:19
FNameAsStringIndexProxyArchive::NamesLoaded
TArray< FName > NamesLoaded
Definition
NameAsStringIndexProxyArchive.h:22
FNameAsStringIndexProxyArchive::FNameAsStringIndexProxyArchive
FNameAsStringIndexProxyArchive(FArchive &InInnerArchive)
Definition
NameAsStringIndexProxyArchive.h:29
Downloads
ArkServerAPI_NEW
ASA
AsaApi
AsaApi
Core
Public
API
UE
Serialization
NameAsStringIndexProxyArchive.h
Generated by
1.10.0