Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
TScopedCallback< CallbackType > Class Template Reference

#include <ScopedCallback.h>

Public Member Functions

 TScopedCallback ()
 
 ~TScopedCallback ()
 
void Request ()
 
void Unrequest ()
 
bool HasRequests () const
 

Private Attributes

int32 Counter
 

Detailed Description

template<class CallbackType>
class TScopedCallback< CallbackType >

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.

Definition at line 13 of file ScopedCallback.h.

Constructor & Destructor Documentation

◆ TScopedCallback()

Definition at line 17 of file ScopedCallback.h.

◆ ~TScopedCallback()

Fires a callback if outstanding requests exist.

Definition at line 22 of file ScopedCallback.h.

Member Function Documentation

◆ HasRequests()

template<class CallbackType >
bool TScopedCallback< CallbackType >::HasRequests ( ) const
inline

Checks whether this callback has outstanding requests.

Returns
true if there are outstanding requests, false otherwise.

Definition at line 47 of file ScopedCallback.h.

◆ Request()

template<class CallbackType >
void TScopedCallback< CallbackType >::Request ( )
inline

Request a callback.

Definition at line 31 of file ScopedCallback.h.

◆ Unrequest()

template<class CallbackType >
void TScopedCallback< CallbackType >::Unrequest ( )
inline

Unrequest a callback.

Definition at line 37 of file ScopedCallback.h.

Member Data Documentation

◆ Counter

template<class CallbackType >
int32 TScopedCallback< CallbackType >::Counter
private

Counts callback requests.

Definition at line 55 of file ScopedCallback.h.


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