UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
Chaos::TEventContainer< PayloadType > Class Template Reference

#include <EventManager.h>

+ Inheritance diagram for Chaos::TEventContainer< PayloadType >:

Public Member Functions

 TEventContainer (const Chaos::EMultiBufferMode &BufferMode, TFunction< void(const FPBDRigidsSolver *Solver, PayloadType &EventDataInOut, bool bResetData)> InFunction)
 
 TEventContainer (TEventContainer< PayloadType > &Other)
 
 ~TEventContainer ()
 
virtual void RegisterHandler (const FEventHandlerPtr &Handler)
 
virtual void UnregisterHandler (const void *InHandler)
 
virtual void InjectProducerData (const FPBDRigidsSolver *Solver, bool bResetData)
 
virtual void DestroyStaleEvents (TFunction< void(PayloadType &EventDataInOut)> InFunction)
 
virtual void AddEvent (TFunction< void(PayloadType &EventDataInOut)> InFunction)
 
virtual void FlipBufferIfRequired ()
 
virtual void ResetConsumerBuffer ()
 
virtual void DispatchConsumerData ()
 
- Public Member Functions inherited from Chaos::FEventContainerBase
virtual ~FEventContainerBase ()
 

Detailed Description

template<typename PayloadType>
class Chaos::TEventContainer< PayloadType >

Class that owns the injected producer function and its associated data buffer

Constructor & Destructor Documentation

◆ TEventContainer() [1/2]

template<typename PayloadType >
Chaos::TEventContainer< PayloadType >::TEventContainer ( const Chaos::EMultiBufferMode BufferMode,
TFunction< void(const FPBDRigidsSolver *Solver, PayloadType &EventDataInOut, bool bResetData)>  InFunction 
)
inline

Regular constructor

◆ TEventContainer() [2/2]

template<typename PayloadType >
Chaos::TEventContainer< PayloadType >::TEventContainer ( TEventContainer< PayloadType > &  Other)
inline

Copy constructor

◆ ~TEventContainer()

template<typename PayloadType >
Chaos::TEventContainer< PayloadType >::~TEventContainer ( )
inline

Destructor cleans up memory

Member Function Documentation

◆ AddEvent()

template<typename PayloadType >
virtual void Chaos::TEventContainer< PayloadType >::AddEvent ( TFunction< void(PayloadType &EventDataInOut)>  InFunction)
inlinevirtual

◆ DestroyStaleEvents()

template<typename PayloadType >
virtual void Chaos::TEventContainer< PayloadType >::DestroyStaleEvents ( TFunction< void(PayloadType &EventDataInOut)>  InFunction)
inlinevirtual

◆ DispatchConsumerData()

template<typename PayloadType >
virtual void Chaos::TEventContainer< PayloadType >::DispatchConsumerData ( )
inlinevirtual

Dispatch events to the registered handlers

Implements Chaos::FEventContainerBase.

◆ FlipBufferIfRequired()

template<typename PayloadType >
virtual void Chaos::TEventContainer< PayloadType >::FlipBufferIfRequired ( )
inlinevirtual

Flips the buffer if the buffer type is double or triple

Implements Chaos::FEventContainerBase.

◆ InjectProducerData()

template<typename PayloadType >
virtual void Chaos::TEventContainer< PayloadType >::InjectProducerData ( const FPBDRigidsSolver Solver,
bool  bResetData 
)
inlinevirtual

◆ RegisterHandler()

template<typename PayloadType >
virtual void Chaos::TEventContainer< PayloadType >::RegisterHandler ( const FEventHandlerPtr Handler)
inlinevirtual

Register the delegate function that will handle the events on the game thread

Implements Chaos::FEventContainerBase.

◆ ResetConsumerBuffer()

template<typename PayloadType >
virtual void Chaos::TEventContainer< PayloadType >::ResetConsumerBuffer ( )
inlinevirtual

Reset the consumer buffer, can be used just before flipping buffers to start with a clean buffer

Implements Chaos::FEventContainerBase.

◆ UnregisterHandler()

template<typename PayloadType >
virtual void Chaos::TEventContainer< PayloadType >::UnregisterHandler ( const void InHandler)
inlinevirtual

Unregister the delegate function that handles the events on the game thread

Implements Chaos::FEventContainerBase.


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