Navigation
API > API/Plugins > API/Plugins/ConcertSyncClient
Maintains a type-safe key/value local map where the values are USTRUCT() struct or a supported basic types (int8, uint8, int16, uint16, int32, uint32, int64, uint64, float, double, bool, FName, FText, FString). This class is meant to be used as a local/private client store where the IConcertClientDataStore interface is meant to be used in a client(s)/server scenario.
Usage exampleFConcertClientLocalDataStoreMyStore;FNameMyKey(TEXT("MyKey1"));uint64MyValue=100ull;if(autoStored=MyStore.FetchOrAdd(MyKey,MyValue)){if(Stored=MyStore.Store(MyKey,Stored.GetValue()+10)){check(MyStore.FetchAs
| Name | FConcertClientLocalDataStore |
| Type | class |
| Header File | /Engine/Plugins/Developer/Concert/ConcertSync/ConcertSyncClient/Source/ConcertSyncClient/Public/ConcertClientLocalDataStore.h |
| Include Path | #include "ConcertClientLocalDataStore.h" |
Syntax
class FConcertClientLocalDataStore
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FConcertClientLocalDataStore() |
Constructs the data store map. | ConcertClientLocalDataStore.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| DataStore | TUniquePtr< FConcertDataStore > | Maps keyName/keyValue. | ConcertClientLocalDataStore.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
TConcertDataStoreResult< T > CompareExchange
(
const FName& Key, |
Exchanges the stored value to Desired if a stored value corresponding to Key exists, has the same type and its value is equal to Expected, otherwise, the operation fails. | ConcertClientLocalDataStore.h | |
TConcertDataStoreResult< T > FetchAs
(
const FName& Key |
Looks up the specified key, if found and type matches, fetches the corresponding value. | ConcertClientLocalDataStore.h | |
TConcertDataStoreResult< T > 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. | ConcertClientLocalDataStore.h | |
TConcertDataStoreResult< T > Store
(
const FName& Key, |
Looks up the specified key, if it doesn't exist yet, adds new key/value pair at version 1, else if the stored value type matched the specified value type, overwrites the value and increment its version by one, otherwise, the operation fails. | ConcertClientLocalDataStore.h |