AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
LambdaBasicEvent< T > Class Template Reference

#include "EventProcessor.h"

Inheritance diagram for LambdaBasicEvent< T >:
BasicEvent

Public Member Functions

 LambdaBasicEvent (T &&callback)
 
bool Execute (uint64, uint32) override
 
- Public Member Functions inherited from BasicEvent
 BasicEvent ()=default
 
virtual ~BasicEvent ()=default
 
virtual bool Execute (uint64, uint32)
 
virtual bool IsDeletable () const
 
virtual void Abort (uint64)
 
void ScheduleAbort ()
 

Private Attributes

_callback
 

Detailed Description

template<typename T>
class LambdaBasicEvent< T >

Constructor & Destructor Documentation

◆ LambdaBasicEvent()

template<typename T >
LambdaBasicEvent< T >::LambdaBasicEvent ( T &&  callback)
inline
77: BasicEvent(), _callback(std::move(callback)) { }
BasicEvent()=default
T _callback
Definition: EventProcessor.h:87

Member Function Documentation

◆ Execute()

template<typename T >
bool LambdaBasicEvent< T >::Execute ( uint64  ,
uint32   
)
inlineoverridevirtual

Reimplemented from BasicEvent.

80 {
81 _callback();
82 return true;
83 }

References LambdaBasicEvent< T >::_callback.

Member Data Documentation

◆ _callback

template<typename T >
T LambdaBasicEvent< T >::_callback
private