Navigation
Unreal Engine C++ API Reference > Plugins > ConcertSyncClient > FConcertClientLocalDataStore
References
Module | ConcertSyncClient |
Header | /Engine/Plugins/Developer/Concert/ConcertSync/ConcertSyncClient/Source/ConcertSyncClient/Public/ConcertClientLocalDataStore.h |
Include | #include "ConcertClientLocalDataStore.h" |
template<typename T>
TConcertDataStoreResult< T > CompareExchange
&40;
const FName & Key,
const T & Expected,
const T & Desired
&41;
Remarks
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. The operation result. The possible result codes are:
- EConcertDataStoreResultCode::Exchanged if the desired value was sucessfully exchanged and stored. The result holds a pointer on the newly stored value.
- EConcertDataStoreResultCode::Fetched if the stored value was not the expected one. The stored value was fetched instead. The result holds a pointer on the fetched value.
- EConcertDataStoreResultCode::NotFound if the key could not be found. The result holds a null pointer.
- EConcertDataStoreResultCode::TypeMismatch if the stored data type did not match the expected/desired type. The result holds a null pointer.
Parameters
Name | Description |
---|---|
T | Any USTRUCT() struct or a supported basic types (int8, uint8, int16, uint16, int32, uint32, int64, uint64, float, double, bool, FName, FText, FString). |
Key | The value name. |
Expected | The value the caller expects to be stored. |
Desired | The value the caller wants to store. |