|
resonance 1.0.1
|
Sink that forwards every message it receives to one other sink. More...
#include <rendererbase.h>


Public Member Functions | |
| virtual void | Dispatch (Message *pMsg) |
| Forward the message to the target sink. | |
| virtual void | DispatchPriv (Message *pMsg) |
| Receive a message directly, which this class ignores. | |
| 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 () |
Public Attributes | |
| MsgSink * | mTarget |
| The sink every message is handed to. | |
Sink that forwards every message it receives to one other sink.
Its RTTI descriptor is at 0x00901fa0, recorded as single inheritance from MsgSink at offset 0. The object is eight bytes: the four-byte MsgSink subobject, whose table pointer sits at offset 0, followed by the target at +0x04.
172 tables in the image place the shared MsgSink::Dispatch() body at slot 2. This class and RendererBase are the two that override it, and the tables of RendererBase's subclasses inherit RendererBase's override.
The destructor at 0x00139d70 is implicitly declared. It is byte-identical to MsgSink's, because a trivial derived destructor stores only the base table pointer.
|
virtual |
Forward the message to the target sink.
The body reads the target from +0x04, takes the delta and the function pointer of that target's own table slot 3, and dispatches with the adjusted receiver. The message itself is never touched: it stays in the argument register the caller placed it in and passes through to the target unchanged. Dispatching slot 3 rather than slot 2 means the target's DispatchPriv() runs directly, so a chain of routers cannot form.
| pMsg | The message to forward. |
Reimplemented from MsgSink.
|
virtual |
Receive a message directly, which this class ignores.
The body is empty. The class exists to forward through Dispatch(), so the slot that would consume a message has nothing to do. MsgSink declares it pure, so an override has to exist for the class to be concrete.
| pMsg | The message, which the body does not read. |
Implements MsgSink.
| MsgSink* RendererBase::Router::mTarget |
The sink every message is handed to.
+0x04
Public because RendererBase's constructor writes it directly, and an enclosing class has no access to a nested class's private members. A friend declaration fits equally well.