|
wavelength 1.0.0
|
Sender of engine messages, which stores the list of sinks that receive them. More...
#include <msgsource.h>

Public Member Functions | |
| MsgSource () | |
| Construct a source with no sinks. | |
| virtual | ~MsgSource () |
| Release the list of sinks. | |
| 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) |
| Deliver a message to every registered sink, in registration order. | |
| bool | SendUntilHandled (Message *pMsg) |
| Deliver a message to the registered sinks in registration order until one handles it. | |
| MsgSource () | |
| Create a source with no sinks. | |
| virtual | ~MsgSource () |
| Free the list of sinks. | |
| virtual void | AddSink (MsgSink *sink) |
| Add a sink at the end of the list, unless it is already there. | |
| virtual void | RemoveSink (MsgSink *sink) |
| Remove a sink, which must be in the list. | |
Public Attributes | |
| int | mGraphBuilt |
Sender of engine messages, which stores the list of sinks that receive them.
Sender of messages to a list of sinks.
The RTTI includes the class name and records no base. The data members precede the vptr, which sits at +0x0c. A sink removed while a message is being delivered is first cleared, and the delivery loop removes the cleared entry.
The RTTI records the class. The object is 0xc bytes. The name of the flag at +0x04 follows the game's MsgSource; its meaning here is inferred from RemoveSink().
| MsgSource::MsgSource | ( | ) |
Construct a source with no sinks.
|
virtual |
Release the list of sinks.
| MsgSource::MsgSource | ( | ) |
Create a source with no sinks.
|
virtual |
Free the list of sinks.
The sinks are not destroyed.
|
virtual |
Register a sink, ignoring a sink that is already registered.
| pSink | The sink to register. |
|
virtual |
Unregister the first occurrence of a sink.
During a delivery the entry is cleared instead. A sink that is not registered is ignored.
| pSink | The sink to unregister. |
| void MsgSource::Send | ( | Message * | pMsg | ) |
Deliver a message to every registered sink, in registration order.
| pMsg | The message to deliver. |
| bool MsgSource::SendUntilHandled | ( | Message * | pMsg | ) |
Deliver a message to the registered sinks in registration order until one handles it.
| pMsg | The message to deliver. |
|
virtual |
Add a sink at the end of the list, unless it is already there.
| sink | The sink. |
|
virtual |
Remove a sink, which must be in the list.
While mGraphBuilt is set, its entry is cleared instead.
| sink | The sink. |
| int MsgSource::mGraphBuilt |
While set, RemoveSink() clears entries instead of erasing them.