Navigation
API > API/Runtime > API/Runtime/Chaos
Class that owns the injected producer function and its associated data buffer
| Name | TEventContainer |
| Type | class |
| Header File | /Engine/Source/Runtime/Experimental/Chaos/Public/EventManager.h |
| Include Path | #include "EventManager.h" |
Syntax
template<typename PayloadType>
class TEventContainer : public Chaos::FEventContainerBase
Inheritance Hierarchy
- FEventContainerBase → TEventContainer
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
TEventContainer
(
TEventContainer< PayloadType >& Other |
Copy constructor | EventManager.h | |
TEventContainer
(
const Chaos::EMultiBufferMode& BufferMode, |
Regular constructor | EventManager.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
~TEventContainer() |
Destructor cleans up memory | EventManager.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bDispatchInProgress | bool | Guard flag for the dispatch process - used to defer requests to register or unregister new handlers during dispatch | EventManager.h | |
| DeferredHandlerLock | FTransactionallySafeRWLock | EventManager.h | ||
| DeferredHandlers | TArray< FEventHandlerPtr > | EventManager.h | ||
| DeferredUnregisterHandlers | TArray< const void * > | EventManager.h | ||
| EventBuffer | TUniquePtr< IBufferResource< PayloadType > > | The data buffer that is filled by the producer and read by the consumer | EventManager.h | |
| HandlerLock | FTransactionallySafeRWLock | EventManager.h | ||
| HandlerMap | TMap< void *, FEventHandlerPtr > | Delegate function registered to handle this event when it is dispatched | EventManager.h | |
| HandlersNotInProxyOwnerMap | TMap< void *, FEventHandlerPtr > | EventManager.h | ||
| InjectedFunction | TFunction< void(const FPBDRigidsSolver *Solver, PayloadType &EventData, bool bResetData)> | The function that handles filling the event data buffer | EventManager.h | |
| ProxyOwnerToHandlerMap | TMultiMap< UObject *, FEventHandlerPtr > | EventManager.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void AddEvent
(
TFunction< void(PayloadType&EventDataInOut)> InFunction |
EventManager.h | ||
virtual void DestroyStaleEvents
(
TFunction< void(PayloadType&EventDataInOut)> InFunction |
EventManager.h |
Overridden from FEventContainerBase
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void DispatchConsumerData() |
Dispatch events to the registered handlers | EventManager.h | |
virtual void FlipBufferIfRequired() |
Flips the buffer if the buffer type is double or triple | EventManager.h | |
virtual void InjectProducerData
(
const FPBDRigidsSolver* Solver, |
Inject data from the physics solver into the producer side of the buffer | EventManager.h | |
virtual void RegisterHandler
(
const FEventHandlerPtr& Handler |
Register the delegate function that will handle the events on the game thread | EventManager.h | |
virtual void ResetConsumerBuffer() |
Reset the consumer buffer, can be used just before flipping buffers to start with a clean buffer | EventManager.h | |
virtual void UnregisterHandler
(
const void* InHandler |
Unregister the delegate function that handles the events on the game thread | EventManager.h |