Class base for working with il2cpp events. More...
#include <EventBase.hpp>
Public Member Functions | |
| constexpr | EventBase () noexcept=default |
| Create empty event base. | |
| EventBase (const EventBase &other)=default | |
| Copy event. | |
| EventBase (const IL2CPP::EventInfo *info) | |
| Create event from il2cpp event. | |
| EventBase & | SetInstance (IL2CPP::Il2CppObject *instance) |
| Set event instance if it's non-static. | |
| BNM::Class | GetParentClass () const |
| Get class that contains this event. | |
| EventBase & | operator[] (void *instance) |
| Operator for setting instance. | |
| EventBase & | operator[] (IL2CPP::Il2CppObject *instance) |
| Operator for setting instance. | |
| EventBase & | operator[] (UnityEngine::Object *instance) |
| Operator for setting instance. | |
| bool | IsValid () const noexcept |
| Check if event is valid. | |
| std::string | str () const |
| Get full event name. | |
| template<typename NewRet, typename ... NewParameters> | |
| Event< NewRet, NewParameters... > & | cast () const |
| Cast event to be able to add, remove and raise it. | |
Public Attributes | |
| IL2CPP::EventInfo * | _data {} |
| MethodBase | _add {} |
| MethodBase | _remove {} |
| MethodBase | _raise {} |
| uint8_t | _hasAdd: 1 = false |
| uint8_t | _hasRemove: 1 = false |
| uint8_t | _hasRaise: 1 = false |
Class base for working with il2cpp events.
This class provides fields and some basic functions to allow call, add and remove methods in event.
|
inlinedefault |
Copy event.
| other | Other event |
| BNM::EventBase::EventBase | ( | const IL2CPP::EventInfo * | info | ) |
Create event from il2cpp event.
| info | Il2cpp event |
|
nodiscard |
Get class that contains this event.
|
inlinenodiscardnoexcept |
Check if event is valid.
|
inline |
|
inline |
|
inline |
| EventBase & BNM::EventBase::SetInstance | ( | IL2CPP::Il2CppObject * | instance | ) |
Set event instance if it's non-static.
| instance | Instance |
|
inlinenodiscard |
Get full event name.
Returns string with full event name: ClassFullName.(event name){add method: exists/not exist, remove method: exists/not exist, raise method: exists/not exist} (static)/nothing