UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
TScopeCounter< Type > Struct Template Reference

#include <UnrealTemplate.h>

+ Inheritance diagram for TScopeCounter< Type >:

Public Member Functions

 TScopeCounter (Type &ReferenceValue)
 
 ~TScopeCounter ()
 

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

Constructor & Destructor Documentation

◆ TScopeCounter()

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

◆ ~TScopeCounter()

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

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