engine
 
载入中...
搜索中...
未找到
Public 成员函数 | 所有成员列表
FThreadSafeCounter64类 参考

Thread safe counter for 64bit ints 更多...

#include <ThreadSafeCounter64.h>

Public 成员函数

int64 Add (int64 Amount)
 Adds an amount and returns the old value. 更多...
 
int64 Decrement ()
 Decrement and return new value. 更多...
 
 FThreadSafeCounter64 ()
 Default constructor. 更多...
 
 FThreadSafeCounter64 (const FThreadSafeCounter &Other)
 Copy Constructor. 更多...
 
 FThreadSafeCounter64 (int64 Value)
 Constructor, initializing counter to passed in value. 更多...
 
int64 GetValue () const
 Gets the current value. 更多...
 
int64 Increment ()
 Increment and return new value. 更多...
 
FThreadSafeCounter64 & operator= (const FThreadSafeCounter64 &Other)
 Assignment has the same caveats as the copy ctor.
 
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. 更多...
 

详细描述

Thread safe counter for 64bit ints

构造及析构函数说明

◆ FThreadSafeCounter64() [1/3]

FThreadSafeCounter64::FThreadSafeCounter64 ( )
inline

Default constructor.

Initializes the counter to 0.

◆ FThreadSafeCounter64() [2/3]

FThreadSafeCounter64::FThreadSafeCounter64 ( const FThreadSafeCounter &  Other)
inline

Copy Constructor.

If the counter in the Other parameter is changing from other threads, there are no guarantees as to which values you will get up to the caller to not care, synchronize or other way to make those guarantees.

参数
OtherThe other thread safe counter to copy

◆ FThreadSafeCounter64() [3/3]

FThreadSafeCounter64::FThreadSafeCounter64 ( int64  Value)
inline

Constructor, initializing counter to passed in value.

参数
ValueValue to initialize counter to

成员函数说明

◆ Add()

int64 FThreadSafeCounter64::Add ( int64  Amount)
inline

Adds an amount and returns the old value.

参数
AmountAmount to increase the counter by
返回
the old value
参见
Decrement, Increment, Reset, Set, Subtract

◆ Decrement()

int64 FThreadSafeCounter64::Decrement ( )
inline

Decrement and return new value.

返回
the new, decremented value
参见
Add, Increment, Reset, Set, Subtract

◆ GetValue()

int64 FThreadSafeCounter64::GetValue ( ) const
inline

Gets the current value.

返回
the current value

◆ Increment()

int64 FThreadSafeCounter64::Increment ( )
inline

Increment and return new value.

返回
the new, incremented value
参见
Add, Decrement, Reset, Set, Subtract

◆ Reset()

int64 FThreadSafeCounter64::Reset ( )
inline

Resets the counter's value to zero.

返回
the old value.
参见
Add, Decrement, Increment, Set, Subtract

◆ Set()

int64 FThreadSafeCounter64::Set ( int64  Value)
inline

Sets the counter to a specific value and returns the old value.

参数
ValueValue to set the counter to
返回
The old value
参见
Add, Decrement, Increment, Reset, Subtract

◆ Subtract()

int64 FThreadSafeCounter64::Subtract ( int64  Amount)
inline

Subtracts an amount and returns the old value.

参数
AmountAmount to decrease the counter by
返回
the old value
参见
Add, Decrement, Increment, Reset, Set

该类的文档由以下文件生成: