Ditto 4.13.1
 
Loading...
Searching...
No Matches
ditto::internal Namespace Reference

Namespace for internal Ditto SDK functionality. More...

Classes

class  SynchronizedValue
 Wrapper for a value that can be safely accessed from multiple threads.
 

Functions

template<class R, class F, class T, class M>
apply (F &&f, SynchronizedValue< T, M > &sv)
 Applies a function to the wrapped value of a SynchronizedValue.
 
template<class R, class F, class T, class M>
apply (F &&f, const SynchronizedValue< T, M > &sv)
 Applies a function to the wrapped value of a SynchronizedValue.
 
template<class F, class T, class M>
void apply (F &&f, SynchronizedValue< T, M > &sv)
 Applies a function to the wrapped value of a SynchronizedValue without returning a result.
 
template<class F, class T, class M>
void apply (F &&f, const SynchronizedValue< T, M > &sv)
 Applies a function to the wrapped value of a const SynchronizedValue without returning a result.
 
template<class F, class T, class U, class M, class N>
void apply (F &&f, SynchronizedValue< T, M > &lhs, SynchronizedValue< U, N > &rhs)
 Apply a function to the values of two SynchronizedValue objects.
 
template<class T, class M, class N>
void swap (SynchronizedValue< T, M > &lhs, SynchronizedValue< T, N > &rhs)
 Swaps the values of two SynchronizedValue objects.
 
void transaction_execute_cb (void *env_ptr, dittoffi_result_dittoffi_query_result_ptr_t ffi_result)
 

Detailed Description

Namespace for internal Ditto SDK functionality.

Customer code should not use any of the definitions in this namespace. These elements are not documented nor supported, and may change in any release without notice.

Function Documentation

◆ apply() [1/5]

template<class R, class F, class T, class M>
R ditto::internal::apply ( F && f,
const SynchronizedValue< T, M > & sv )

Applies a function to the wrapped value of a SynchronizedValue.

Parameters
fFunction to apply, which takes a reference to the value type.
svSynchronized value to apply the function to.
Returns
The result of the function application.

◆ apply() [2/5]

template<class F, class T, class M>
void ditto::internal::apply ( F && f,
const SynchronizedValue< T, M > & sv )

Applies a function to the wrapped value of a const SynchronizedValue without returning a result.

Parameters
fFunction to apply, which takes a const reference to the value type.
svConst synchronized value to apply the function to.

◆ apply() [3/5]

template<class F, class T, class U, class M, class N>
void ditto::internal::apply ( F && f,
SynchronizedValue< T, M > & lhs,
SynchronizedValue< U, N > & rhs )

Apply a function to the values of two SynchronizedValue objects.

Template Parameters
FFunction type, which must accept two references to the value type
TValue type of first SynchronizedValue
UValue type of second SynchronizedValue
MMutex type of first SynchronizedValue
NMutex type of second SynchronizedValue
Parameters
lhsFirst SynchronizedValue
rhsSecond SynchronizedValue

◆ apply() [4/5]

template<class R, class F, class T, class M>
R ditto::internal::apply ( F && f,
SynchronizedValue< T, M > & sv )

Applies a function to the wrapped value of a SynchronizedValue.

Parameters
fFunction to apply, which takes a reference to the value type.
svSynchronized value to apply the function to.
Returns
The result of the function application.

◆ apply() [5/5]

template<class F, class T, class M>
void ditto::internal::apply ( F && f,
SynchronizedValue< T, M > & sv )

Applies a function to the wrapped value of a SynchronizedValue without returning a result.

Parameters
fFunction to apply, which takes a reference to the value type.
svSynchronized value to apply the function to.

◆ swap()

template<class T, class M, class N>
void ditto::internal::swap ( SynchronizedValue< T, M > & lhs,
SynchronizedValue< T, N > & rhs )

Swaps the values of two SynchronizedValue objects.

std::swap<T> must be valid.

Template Parameters
TValue type
MMutex type of first SynchronizedValue
NMutex type of second SynchronizedValue
Parameters
lhsFirst SynchronizedValue
rhsSecond SynchronizedValue