Navigation
API > API/Runtime > API/Runtime/Core
Helper object for batching callback requests and firing on destruction of the FScopedCallback object. CallbackType is a class implementing a static method called FireCallback, which does the work.
| Name | TScopedCallback |
| Type | class |
| Header File | /Engine/Source/Runtime/Core/Public/Templates/ScopedCallback.h |
| Include Path | #include "Templates/ScopedCallback.h" |
Syntax
template<class CallbackType>
class TScopedCallback
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
TScopedCallback() |
Templates/ScopedCallback.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
~TScopedCallback() |
Fires a callback if outstanding requests exist. | Templates/ScopedCallback.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| Counter | int32 | Counts callback requests. | Templates/ScopedCallback.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool HasRequests() |
Checks whether this callback has outstanding requests. | Templates/ScopedCallback.h | |
void Request() |
Request a callback. | Templates/ScopedCallback.h | |
void Unrequest() |
Unrequest a callback. | Templates/ScopedCallback.h |