1#ifndef SEAD_DELEGATE_EVENT_SLOT_H_
2#define SEAD_DELEGATE_EVENT_SLOT_H_
4#include <container/seadTList.h>
5#include <heap/seadDisposer.h>
6#include <prim/seadDelegate.h>
46 explicit Slot(U* u,
void (U::*fun)(T))
56 void bind(U* u,
void (U::*fun)(T))
101 if (slot.mConnectedToDelegateEvent)
104 mList.pushBack(&slot.mNode);
105 slot.mConnectedToDelegateEvent =
true;
110 if (!slot.mConnectedToDelegateEvent)
143static_assert(
sizeof(
DelegateEvent<
float>) == 0x10,
"sead::DelegateEvent<T> size mismatch");
Definition seadDelegate.h:278
Definition seadDelegateEventSlot.h:22
Slot()
Definition seadDelegateEventSlot.h:32
bool mConnectedToDelegateEvent
Definition seadDelegateEventSlot.h:27
SlotListNode mNode
Definition seadDelegateEventSlot.h:24
void invoke_(T e)
Definition seadDelegateEventSlot.h:76
bool isConnectedToDelegateEvent() const
Definition seadDelegateEventSlot.h:70
u8 data_[20]
Definition seadDelegateEventSlot.h:26
virtual ~Slot()
Definition seadDelegateEventSlot.h:40
IDelegate1< T > * mDelegatePtr
Definition seadDelegateEventSlot.h:25
void release()
Definition seadDelegateEventSlot.h:61
Slot(U *u, void(U::*fun)(T))
Definition seadDelegateEventSlot.h:46
void bind(U *u, void(U::*fun)(T))
Definition seadDelegateEventSlot.h:56
Definition seadDelegateEventSlot.h:12
DelegateEvent()
Definition seadDelegateEventSlot.h:84
virtual ~DelegateEvent()
Definition seadDelegateEventSlot.h:89
TListNode< Slot * > SlotListNode
Definition seadDelegateEventSlot.h:18
DelegateEvent< T > & operator-=(Slot &slot)
Definition seadDelegateEventSlot.h:122
TList< Slot * > SlotList
Definition seadDelegateEventSlot.h:17
s32 getSlotLength() const
Definition seadDelegateEventSlot.h:134
void fire(T e)
Definition seadDelegateEventSlot.h:128
DelegateEvent< T > & operator+=(Slot &slot)
Definition seadDelegateEventSlot.h:116
SlotList mList
Definition seadDelegateEventSlot.h:140
void disconnect(Slot &slot)
Definition seadDelegateEventSlot.h:108
void connect(Slot &slot)
Definition seadDelegateEventSlot.h:99
Definition seadDelegate.h:266
Definition seadDisposer.h:12
Definition seadTList.h:13
Definition seadTList.h:49
Definition seadAssert.h:44