Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
TAtomic< T > Class Template Reference

#include <Atomic.h>

+ Inheritance diagram for TAtomic< T >:
+ Collaboration diagram for TAtomic< T >:

Public Types

using ElementType = T
 

Public Member Functions

FORCEINLINE TAtomic ()=default
 
constexpr TAtomic (T Arg)
 
FORCEINLINE operator T () const
 
FORCEINLINE T operator= (T Value)
 

Private Member Functions

 TAtomic (TAtomic &&)=delete
 
 TAtomic (const TAtomic &)=delete
 
TAtomicoperator= (TAtomic &&)=delete
 
TAtomicoperator= (const TAtomic &)=delete
 

Detailed Description

template<typename T>
class TAtomic< T >

DEPRECATED! UE atomics are not maintained and potentially will be physically deprecated. Use std::atomic<T> for new code

Atomic object wrapper class which wraps an element of T. This allows the following benefits:

  • Changes made to the element on one thread can never be observed as a partial state by other threads. (atomicity)
  • Memory accesses within a thread are not reordered across any access of the element. (acquire/release semantics)
  • There is a single, visible, global order of atomic accesses throughout the system. (sequential consistency)

Definition at line 645 of file Atomic.h.

Member Typedef Documentation

◆ ElementType

template<typename T >
using TAtomic< T >::ElementType = T

Definition at line 650 of file Atomic.h.

Constructor & Destructor Documentation

◆ TAtomic() [1/4]

template<typename T >
FORCEINLINE TAtomic< T >::TAtomic ( )
default

Default initializes the element type. NOTE: This will leave the value uninitialized if it has no constructor.

◆ TAtomic() [2/4]

template<typename T >
constexpr TAtomic< T >::TAtomic ( T Arg)
inlineconstexpr

Initializes the element type with the given argument types.

Parameters
ArgThe value to initialize the element counter to
Note
This constructor is not atomic.

Definition at line 664 of file Atomic.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ TAtomic() [3/4]

template<typename T >
TAtomic< T >::TAtomic ( TAtomic< T > && )
privatedelete

◆ TAtomic() [4/4]

template<typename T >
TAtomic< T >::TAtomic ( const TAtomic< T > & )
privatedelete

Member Function Documentation

◆ operator T()

template<typename T >
FORCEINLINE TAtomic< T >::operator T ( ) const
inline

Gets a copy of the current value of the element.

Returns
The current value.

Definition at line 674 of file Atomic.h.

◆ operator=() [1/3]

template<typename T >
TAtomic & TAtomic< T >::operator= ( const TAtomic< T > & )
privatedelete

◆ operator=() [2/3]

template<typename T >
FORCEINLINE T TAtomic< T >::operator= ( T Value)
inline

Sets the element to a specific value, returning a copy of the value.

Parameters
ValueThe value to set the element to.
Returns
A copy of Value.

Definition at line 686 of file Atomic.h.

◆ operator=() [3/3]

template<typename T >
TAtomic & TAtomic< T >::operator= ( TAtomic< T > && )
privatedelete

The documentation for this class was generated from the following files: