IConcertClientDataStore::CompareExchange

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.

Windows
MacOS
Linux

References

Module

ConcertSyncClient

Header

/Engine/Plugins/Developer/Concert/ConcertSync/ConcertSyncClient/Source/ConcertSyncClient/Public/IConcertClientDataStore.h

Include

#include "IConcertClientDataStore.h"

Syntax

template<typename T>
TFuture< TConcertDataStoreResult< T > > CompareExchange
(
    const FName & Key,
    const T & Expected,
    const T & Desired
)

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.

Returns

Whether or not the key value was exchanged, as a future. The result code can be:

Parameters

Parameter

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.

See Also

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss