More work on State System

This commit is contained in:
2023-03-01 08:03:03 -08:00
parent f723c5f20a
commit 7e452eb365
6 changed files with 167 additions and 48 deletions

View File

@ -8,12 +8,12 @@
#include "assert/assert.hpp"
namespace Dawn {
template<typename... A>
struct IEventListener {
/**
* Abstracted method for C++ template reasons. Invokes the listener.
*
* @deprecated
* @param args Arguments to pass to the listener.
*/
virtual void invoke(A... args) = 0;
@ -27,6 +27,7 @@ namespace Dawn {
/**
* Construct a new event listener structure.
*
* @deprecated
* @param instance Instance that the callback belongs to.
* @param callback Callback method that invokes back.
*/
@ -42,6 +43,7 @@ namespace Dawn {
}
};
/** @deprecated */
template<typename...A>
class Event {
private:
@ -51,6 +53,7 @@ namespace Dawn {
/**
* Add a listener to this event.
*
* @deprecated
* @tparam T The class that will receive the event.
* @param instance Instance of type T that will receive the callback.
* @param callback Callback method attached to T to receive the event.
@ -72,6 +75,7 @@ namespace Dawn {
/**
* Removes an event listener from this event.
*
* @deprecated
* @tparam T The class that was once receiving the event.
* @param instance Instance of type T that did receive the callback.
* @param callback Callback method attached to T for the event.
@ -99,6 +103,7 @@ namespace Dawn {
/**
* Invokes the event and emits to all of the listeners.
*
* @deprecated
* @param args Arguments for this event to pass to the listeners.
*/
void invoke(A... args) {