resonance 1.0.1
Loading...
Searching...
No Matches
MsgJoiner Class Reference

Sink that sends every message it receives on to its own sinks. More...

#include <msgjoiner.h>

Inheritance diagram for MsgJoiner:
Collaboration diagram for MsgJoiner:

Public Member Functions

virtual void DispatchPriv (Message *pMsg)
 Send the message to every registered sink.
Public Member Functions inherited from MsgSource
virtual ~MsgSource ()
virtual void AddSink (MsgSink *pSink)
 Register a sink, ignoring a sink that is already registered.
virtual void RemoveSink (MsgSink *pSink)
 Unregister the first occurrence of a sink.
void Send (Message *pMsg) const
 Deliver a message to every registered sink, in registration order.
void ClearSinks ()
 Unregister every sink.
Public Member Functions inherited from MsgSink
void * operator new (size_t nSize)
 Allocate a sink from the tagged heap under the tag "MsgSink".
void operator delete (void *pBlock)
 Release a sink to the tagged heap.
virtual ~MsgSink ()
virtual void Dispatch (Message *pMsg)
 Accept a message.

Additional Inherited Members

Public Attributes inherited from MsgSource
int mGraphBuilt
 A word no member of this class reads.

Detailed Description

Sink that sends every message it receives on to its own sinks.

It has MsgSource at offset 0 and MsgSink at +0x14. The primary table at 0x007dcc78 retains MsgSource::AddSink() and MsgSource::RemoveSink(), and the MsgSink table at 0x007dcc50 adjusts this by -20, retains MsgSink::Dispatch(), and fills slot 3 with DispatchPriv() below. GrooveWorld's setup routine at 0x0018cce8 creates the one instance with a 0x18-byte allocation. The allocation has no room for a member beyond the two bases.

The constructor at 0x001940e0 and the destructor at 0x00195a30 are both implicitly declared. The first runs the MsgSource constructor and installs the two tables, and the second restores the base tables, frees MsgSource's vector, and releases the object under MsgSink's tag, which is what the compiler generates for a class with no member of its own.

Member Function Documentation

◆ DispatchPriv()

virtual void MsgJoiner::DispatchPriv ( Message * pMsg)
virtual

Send the message to every registered sink.

Slot 3 of the MsgSink table.

Parameters
pMsgThe message.
Ghidra address:
NTSC-U/C: 0x00195b70
Ghidra address:
PAL: 0x0019b808

Implements MsgSink.


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