Spore ModAPI  2.4.0
API for creating C++ mods for Spore
Public Member Functions | List of all members
App::IMessageListener Class Referenceabstract

An interface that can receive messages sent through the app. More...

#include <IMessageListener.h>

Inheritance diagram for App::IMessageListener:
App::cGameModeManager App::cPropManager App::DefaultMessageListener App::ICameraManager App::LambdaMessageListener Editors::EditorCamera Editors::EditorUI GameCiv::GameCiv Graphics::cRenderTargetManager Palettes::OutfitterItemUI Palettes::PaletteCategoryUI Simulator::cCity Simulator::cGameBehaviorManager Simulator::cGameNounManager Simulator::cGameViewManager Simulator::cRelationshipManager Simulator::cSimulatorSpaceGame Simulator::cSimulatorSystem Simulator::cStarManager Terrain::Sphere::cTerrainSphere UI::SpaceGameUI

Public Member Functions

virtual ~IMessageListener ()
 
virtual bool HandleMessage (uint32_t messageID, void *pMessage)=0
 Called every time a message is received. More...
 
virtual int AddRef ()=0
 
virtual int Release ()=0
 

Detailed Description

An interface that can receive messages sent through the app.

Using the App::IMessageManager, listeners sign up to receive certain message IDs.

Constructor & Destructor Documentation

◆ ~IMessageListener()

virtual App::IMessageListener::~IMessageListener ( )
inlinevirtual

Member Function Documentation

◆ AddRef()

virtual int App::IMessageListener::AddRef ( )
pure virtual

◆ HandleMessage()

virtual bool App::IMessageListener::HandleMessage ( uint32_t  messageID,
void *  pMessage 
)
pure virtual

Called every time a message is received.

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

Parameters
messageIDThe ID of the message received.
msgThe data of the message received, it might be nullptr.
Returns
Whether the message was handled or not.

Implemented in Simulator::ScheduledTaskListener, App::ScheduledTaskListener, App::UpdateMessageListener, App::LambdaMessageListener, Palettes::PaletteCategoryUI, Editors::EditorUI, App::cPropManager, App::cGameModeManager, and App::cCameraManager.

◆ Release()

virtual int App::IMessageListener::Release ( )
pure virtual

The documentation for this class was generated from the following file: