Ark Server API (ASE) - Wiki
Loading...
Searching...
No Matches
TScopeCounter< Type > Struct Template Reference

#include <UnrealTemplate.h>

+ Inheritance diagram for TScopeCounter< Type >:
+ Collaboration diagram for TScopeCounter< Type >:

Public Member Functions

 TScopeCounter (Type &ReferenceValue)
 
 ~TScopeCounter ()
 

Private Attributes

Type & RefValue
 

Additional Inherited Members

- Private Member Functions inherited from FNoncopyable
 FNoncopyable ()
 
 ~FNoncopyable ()
 

Detailed Description

template<typename Type>
struct TScopeCounter< Type >

Commonly used to make sure a value is incremented, and then decremented anyway the function can terminate. Usage: TScopeCounter<int32> BeginProcessing(ProcessingCount); // increments ProcessingCount, and decrements it in the dtor

Definition at line 283 of file UnrealTemplate.h.

Constructor & Destructor Documentation

◆ TScopeCounter()

template<typename Type >
TScopeCounter< Type >::TScopeCounter ( Type & ReferenceValue)
inline

Definition at line 285 of file UnrealTemplate.h.

◆ ~TScopeCounter()

template<typename Type >
TScopeCounter< Type >::~TScopeCounter ( )
inline

Definition at line 290 of file UnrealTemplate.h.

Member Data Documentation

◆ RefValue

template<typename Type >
Type& TScopeCounter< Type >::RefValue
private

Definition at line 296 of file UnrealTemplate.h.


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