Navigation
API > API/Plugins > API/Plugins/ConcertSyncCore
References
| Module | ConcertSyncCore |
| Header | /Engine/Plugins/Developer/Concert/ConcertSync/ConcertSyncCore/Source/ConcertSyncCore/Public/ConcertDataStore.h |
| Include | #include "ConcertDataStore.h" |
Syntax
class FConcertDataStore
Remarks
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
Constructors
| Type | Name | Description | |
|---|---|---|---|
FConcertDataStore
(
EUpdatePolicy InUpdatePolicy |
Construct the store. |
Functions
| Type | Name | Description | |
|---|---|---|---|
| FConcertDataStoreResult | Looks up the specified key, if found and types match, fetches the corresponding value. | ||
| 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. | |
| int32 | GetSize () |
Returns the number of key/value pairs currently stored. | |
| TOptional< uint32 > | GetVersion
(
const FName& Key |
Returns the version of the specified key if found. | |
| FConcertDataStoreResult | 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. | ||
| void | Visit
(
const TFunctionRef< void(const FName&, const FConcertDataStore_StoreValue&)>& Visitor |
Visits all the key/value currently stored. |
Enums
| Type | Name | Description | |
|---|---|---|---|
| EUpdatePolicy | Defines how the store updates an existing value. |