Navigation
API > API/Plugins > API/Plugins/ConcertSyncCore
Maintains a type-safe key/value map where the values are USTRUCT() structs serialized into a FConcertDataStore_StoreValue. Each key/value pair has a version, starting at 1 which incremented every times the value change.
The implementation is not thread safe. It is left to the user to synchronize access to the store.How to set up a value in the store.template
How to read a value from the store.template
| Name | FConcertDataStore |
| Type | class |
| Header File | /Engine/Plugins/Developer/Concert/ConcertSync/ConcertSyncCore/Source/ConcertSyncCore/Public/ConcertDataStore.h |
| Include Path | #include "ConcertDataStore.h" |
Syntax
class FConcertDataStore
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FConcertDataStore
(
EUpdatePolicy InUpdatePolicy |
Construct the store. | ConcertDataStore.h |
Enums
Public
| Name | Remarks |
|---|---|
| EUpdatePolicy | Defines how the store updates an existing value. |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| KeyValueMap | TMap< FName, FConcertDataStoreValueRef > | Maps keyName/keyValue. | ConcertDataStore.h | |
| UpdatePolicy | EUpdatePolicy | Defines how the values are updated in the store. | ConcertDataStore.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FConcertDataStoreResult Fetch
(
const FName& Key, |
Looks up the specified key, if found and types match, fetches the corresponding value. | ConcertDataStore.h | |
FConcertDataStoreResult FetchOrAdd
(
const FName& Key, |
Searches the store for the specified key, if not found, adds a new key/value pair, otherwise, if the stored value type matches the initial value type, fetches the stored value. | ConcertDataStore.h | |
int32 GetSize() |
Returns the number of key/value pairs currently stored. | ConcertDataStore.h | |
| Returns the version of the specified key if found. | ConcertDataStore.h | ||
FConcertDataStoreResult Store
(
const FName& Key, |
Looks up the specified key, if it doesn't exist yet, adds new key/value pair, else, if the stored value type matches the specified value type, updates the value. | ConcertDataStore.h | |
void Visit
(
const TFunctionRef< void(const FName&, const FConcertDataStore_StoreValue&)>& Visitor |
Visits all the key/value currently stored. | ConcertDataStore.h |