Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
FScopedEvent Class Reference

#include <ScopedEvent.h>

+ Collaboration diagram for FScopedEvent:

Public Member Functions

 FScopedEvent ()
 
 ~FScopedEvent ()
 
void Trigger ()
 
bool IsReady ()
 
FEventGet ()
 

Private Attributes

FEventEvent
 

Detailed Description

This class is allows a simple one-shot scoped event.

Usage: { FScopedEvent MyEvent; SendReferenceOrPointerToSomeOtherThread(&MyEvent); // Other thread calls MyEvent->Trigger(); // MyEvent destructor is here, we wait here. }

Definition at line 18 of file ScopedEvent.h.

Constructor & Destructor Documentation

◆ FScopedEvent()

FScopedEvent::FScopedEvent ( )

Default constructor.

◆ ~FScopedEvent()

FScopedEvent::~FScopedEvent ( )

Destructor.

Member Function Documentation

◆ Get()

FEvent * FScopedEvent::Get ( )
inline

Retrieve the event, usually for passing around.

Returns
The event.

Definition at line 47 of file ScopedEvent.h.

◆ IsReady()

bool FScopedEvent::IsReady ( )

Checks if the event has been triggered (used for special early out cases of scope event) if this returns true once it will return true forever

Returns
returns true if the scoped event has been triggered once

◆ Trigger()

void FScopedEvent::Trigger ( )
inline

Triggers the event.

Definition at line 29 of file ScopedEvent.h.

+ Here is the call graph for this function:

Member Data Documentation

◆ Event

FEvent* FScopedEvent::Event
private

Holds the event.

Definition at line 55 of file ScopedEvent.h.


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