Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
FThreadSafeBool Class Reference

#include <ThreadSafeBool.h>

+ Inheritance diagram for FThreadSafeBool:
+ Collaboration diagram for FThreadSafeBool:

Public Member Functions

 FThreadSafeBool (bool bValue=false)
 
FORCEINLINE operator bool () const
 
FORCEINLINE bool operator= (bool bNewValue)
 
FORCEINLINE bool AtomicSet (bool bNewValue)
 

Additional Inherited Members

- Private Types inherited from FThreadSafeCounter
typedef int32 IntegerType
 
- Private Member Functions inherited from FThreadSafeCounter
 FThreadSafeCounter ()
 
 FThreadSafeCounter (const FThreadSafeCounter &Other)
 
 FThreadSafeCounter (int32 Value)
 
int32 Increment ()
 
int32 Add (int32 Amount)
 
int32 Decrement ()
 
int32 Subtract (int32 Amount)
 
int32 Set (int32 Value)
 
int32 Reset ()
 
int32 GetValue () const
 

Detailed Description

Thread safe bool, wraps FThreadSafeCounter

Definition at line 15 of file ThreadSafeBool.h.

Constructor & Destructor Documentation

◆ FThreadSafeBool()

FThreadSafeBool::FThreadSafeBool ( bool bValue = false)
inline

Constructor optionally takes value to initialize with, otherwise initializes false

Parameters
bValueValue to initialize with

Definition at line 23 of file ThreadSafeBool.h.

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

Member Function Documentation

◆ AtomicSet()

FORCEINLINE bool FThreadSafeBool::AtomicSet ( bool bNewValue)
inline

Sets a new value atomically, and returns the old value.

Parameters
bNewValueValue to set
Returns
The old value

Definition at line 50 of file ThreadSafeBool.h.

+ Here is the call graph for this function:

◆ operator bool()

FORCEINLINE FThreadSafeBool::operator bool ( ) const
inline

Operator to use this struct as a bool with thread safety

Definition at line 30 of file ThreadSafeBool.h.

+ Here is the call graph for this function:

◆ operator=()

FORCEINLINE bool FThreadSafeBool::operator= ( bool bNewValue)
inline

Operator to set the bool value with thread safety

Definition at line 38 of file ThreadSafeBool.h.

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

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