App::LambdaMessageListener class

An implementation of IMessageListener using lambda functions.

Base classes

class IMessageListener
An interface that can receive messages sent through the app.

Public types

using HandleMessage_T = eastl::function<bool(uint32_t, void*)>

Constructors, destructors, conversion operators

LambdaMessageListener(HandleMessage_T function)
~LambdaMessageListener() virtual

Public functions

auto HandleMessage(uint32_t messageID, void* msg) -> bool override
Called every time a message is received.
auto AddRef() -> int override
auto Release() -> int override

Protected variables

int mnRefCount
HandleMessage_T mFunction

Function documentation

bool App::LambdaMessageListener::HandleMessage(uint32_t messageID, void* msg) override

Called every time a message is received.

Parameters
messageID The ID of the message received.
msg The data of the message received, it might be nullptr.
Returns Whether the message was handled or not.

Only the messages with an ID this listened signed up for will call this event.