ezEngine  Release 25.03
ezEvent< EventData, MutexType, AllocatorWrapper, EventType > Class Template Reference

#include <Event.h>

Inheritance diagram for ezEvent< EventData, MutexType, AllocatorWrapper, EventType >:

Public Member Functions

 ezEvent (ezAllocator *pAllocator)
 
- Public Member Functions inherited from ezEventBase< EventData, ezNoMutex, ezEventType::Default >
void Broadcast (EventData pEventData, ezUInt8 uiMaxRecursionDepth=MaxRecursionDepthDefault)
 This function will broadcast to all registered users, that this event has just happened. Setting uiMaxRecursionDepth will allow you to permit recursions. When broadcasting consider up to what depth you want recursions to be permitted. By default no recursion is allowed. More...
 
ezEventSubscriptionID AddEventHandler (Handler handler) const
 Adds a function as an event handler. All handlers will be notified in the order that they were registered. More...
 
void AddEventHandler (Handler handler, Unsubscriber &inout_unsubscriber) const
 An overload that adds an event handler and initializes the given Unsubscriber object. More...
 
void RemoveEventHandler (const Handler &handler) const
 Removes a previously registered handler. It is an error to remove a handler that was not registered. More...
 
void RemoveEventHandler (ezEventSubscriptionID &inout_id) const
 Removes a previously registered handler via the returned subscription ID. More...
 
bool HasEventHandler (const Handler &handler) const
 Checks whether an event handler has already been registered.
 
void Clear ()
 Removes all registered event handlers.
 
bool IsEmpty () const
 Returns true, if no event handlers are registered.
 
 EZ_DISALLOW_COPY_AND_ASSIGN (ezEventBase)
 

Additional Inherited Members

- Public Types inherited from ezEventBase< EventData, ezNoMutex, ezEventType::Default >
enum  
 Implementation specific constants.
 
using Handler = ezDelegate< void(EventData)>
 Notification callback type for events.
 
- Protected Member Functions inherited from ezEventBase< EventData, ezNoMutex, ezEventType::Default >
 ezEventBase (ezAllocator *pAllocator)
 Constructor.
 

Detailed Description

template<typename EventData, typename MutexType = ezNoMutex, typename AllocatorWrapper = ezDefaultAllocatorWrapper, ezEventType EventType = ezEventType::Default>
class ezEvent< EventData, MutexType, AllocatorWrapper, EventType >

See also
ezEventBase

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