Navigation
API > API/Runtime > API/Runtime/Core > API/Runtime/Core/HAL
References
| Module | Core |
| Header | /Engine/Source/Runtime/Core/Public/HAL/ThreadSafeCounter64.h |
| Include | #include "HAL/ThreadSafeCounter64.h" |
Syntax
class FThreadSafeCounter64
Remarks
Thread safe counter for 64bit ints
Constructors
| Type | Name | Description | |
|---|---|---|---|
| Default constructor.Initializes the counter to 0. | |||
FThreadSafeCounter64
(
const FThreadSafeCounter64& Other |
Copy Constructor. | ||
FThreadSafeCounter64
(
int64 Value |
Constructor, initializing counter to passed in value. |
Functions
| Type | Name | Description | |
|---|---|---|---|
| int64 | Add
(
int64 Amount |
Adds an amount and returns the old value. | |
| int64 | Decrement () |
Decrement and return new value. | |
| int64 | GetValue () |
Gets the current value. | |
| int64 | Increment () |
Increment and return new value. | |
| int64 | Reset () |
Resets the counter's value to zero. | |
| int64 | Set
(
int64 Value |
Sets the counter to a specific value and returns the old value. | |
| int64 | Subtract
(
int64 Amount |
Subtracts an amount and returns the old value. |
Operators
| Type | Name | Description | |
|---|---|---|---|
| FThreadSafeCounter64 & | operator=
(
const FThreadSafeCounter64& Other |
Assignment has the same caveats as the copy ctor. |
Typedefs
| Name | Description |
|---|---|
| IntegerType |