|
resonance 1.0.1
|
Abstract base shared by a family of messages. More...
#include <musemsg.h>


Public Member Functions | |
| MuseMsg () | |
| Start the song position at kTickInfinity. | |
| MuseMsg (int nTick) | |
| Start the song position at a tick. | |
| MuseMsg * | CloneAndShift (int nTick) |
| Copy this message and move the copy to a song position. | |
| Public Member Functions inherited from Message | |
| void * | operator new (size_t nSize) |
| Allocate a message from the tagged heap under the tag MSG. | |
| void | operator delete (void *pBlock) |
| Release a message to the tagged heap under the tag MSG. | |
| virtual | ~Message () |
| Vtable slot 1. | |
| virtual Message * | Clone ()=0 |
| Produce a heap copy of this message. | |
| virtual int | Type ()=0 |
| Report this message's registered identity. | |
| virtual const char * | GetName () const =0 |
| Report this message's class name. | |
| virtual void | PrintExtra (std::ostream &stream) const |
| Write this message's payload to a stream. | |
| virtual void | saveGuts (OBStream &stream) const |
| Write this message's payload to an output stream. | |
| virtual void | restoreGuts (IBStream &stream) |
| Read this message's payload from an input stream. | |
| std::ostream & | Print (std::ostream &stream) const |
| Write this message to a diagnostic stream as {GetName() PrintExtra()}. | |
Public Attributes | |
| int | mTick |
| The song position, in MIDI ticks. | |
Additional Inherited Members | |
| Static Public Member Functions inherited from Message | |
| static Message * | NewMessage (int nType) |
| Produce a message of the identified class through the factory list. | |
Abstract base shared by a family of messages.
Its RTTI descriptor is at 0x008ef330. It has Message as its one base. Its vtable is at 0x007dd628. Every one of the 4 derived Clone() routines installs it before the derived table. That table has eight entries and a zero terminator at index 8. Slots 2, 3, and 4 address the pure-virtual handler, and slots 5, 6, and 7 retain Message::PrintExtra(), Message::saveGuts(), and Message::restoreGuts(), so the class implements none of the virtuals it inherits and is never instantiated. It is declared because its derived classes need it.
The destructor at slot 1 is byte-identical to Message's, because it stores its own table pointer, the inlined base destructor overwrites it, and the compiler drops the dead first store. It is therefore the implicitly declared destructor, and this class owes no definition.
Slot 0 of that table is 0x0019a988 and slot 1 the destructor at 0x0019a958.
The payload is inferred from the derived classes rather than from any routine of its own, because Clone() in a derived class copies the whole object. Only this one field is copied identically by all four derived classes. MultiMuseMsg copies a word at +0x08 where NoteMsg and StdMidiMsg copy bytes there, and a single word store cannot straddle a base and a derived class in a member-wise copy, so +0x08 belongs to each derived class rather than here.
|
inline |
Start the song position at kTickInfinity.
No address attaches to the constructor on its own. Every construction in the image expands it in place, storing 0x2aaaaaab at +0x04: the New() factories of StdMidiMsg at 0x003d6d40, NoteMsg at 0x003d6d80, and SustainNoteMsg at 0x003d6e50, and the StdMidiMsg Mixer builds on its stack at 0x001a7340.
|
inlineexplicit |
Start the song position at a tick.
Inline, with no address of its own. The stack builds of StdMidiMsg in NotePlayer at 0x001b3fb8 and of AllNotesOffMsg in AutoRiffer at 0x001993c4 store the position directly at +0x04.
| nTick | The song position, in MIDI ticks. |
| MuseMsg * MuseMsg::CloneAndShift | ( | int | nTick | ) |
Copy this message and move the copy to a song position.
The copy comes from Clone(), and the caller owns it. Sequencer::Dispatch() is the caller.
| nTick | The song position of the copy, in MIDI ticks. |
| int MuseMsg::mTick |
The song position, in MIDI ticks.
+0x04
Public because NoteFinder::DispatchPriv() at 0x001023b0 reads it directly from a NoteMsg with no accessor in the image.