|
resonance 1.0.1
|
Dispatcher of one range of timed messages against a clock. More...
#include <sequencer.h>


Public Member Functions | |
| Sequencer (T begin, T finish) | |
| Prepare a sequencer over a range, before any post. | |
| virtual | ~Sequencer () |
| Withdraw the queued command, release it, and free the sequencer. | |
| virtual void | Dispatch () |
| Send a copy of the message at the cursor stamped with its tick, then schedule the next. | |
| void | Post (Sch::TickClock *pClock, MsgSink *pSink) |
| Record the clock and the sink and start sending the range. | |
| void | ScheduleNext () |
| Queue or send the message at the cursor. | |
| Public Member Functions inherited from GenericSequencer | |
| GenericSequencer () | |
| Prepare a sequencer before any post. | |
| virtual | ~GenericSequencer () |
| Release the sequencer. | |
| void | Withdraw () |
| Withdraw every command queued under the handle. | |
Static Public Member Functions | |
| static void * | operator new (size_t nSize) |
| Allocate a sequencer under the tag Sequencer. | |
| static void | operator delete (void *pBlock) |
| Release a sequencer under the tag Sequencer. | |
Public Attributes | |
| T | mCursor |
| The next object to send. | |
| T | mBegin |
| T | mFinish |
Additional Inherited Members | |
| Protected Types inherited from GenericSequencer | |
| enum | { kUnallocatedCommand = -2 } |
| Protected Attributes inherited from GenericSequencer | |
| Sch::CmdID | mCmdId |
| SequencerCmd * | mCommand |
| Sch::TickClock * | mClock |
| Sch::Tick | mStartTick |
| Sch::Tick | mOffset |
| MsgSink * | mSink |
Dispatcher of one range of timed messages against a clock.
The one instantiation in the image is Sequencer<TickObj<MuseMsg *> const *>, whose descriptor is at 0x008eec48 with GenericSequencer as its one base at offset 0 and whose table is at 0x007cc7e8. MultiMusePlayer::Start() and BarSequencer::Tick() construct it, each taking 0x2c bytes under the tag Sequencer.
Post() records the clock and the sink and sends the range in order, each message at its own position relative to the clock's position at the post. A message due at once is sent immediately, and a later one waits for SequencerCmd. The bodies are template code, and the one instantiation's out-of-line copies sit in the Sequencer unit with further per-unit copies elsewhere.
|
inline |
Prepare a sequencer over a range, before any post.
Inline, and expanded into both allocations. The next tick starts at kTickInfinity.
| begin | First object of the range. |
| finish | One past the last object of the range. |
Withdraw the queued command, release it, and free the sequencer.
|
inlinestatic |
Allocate a sequencer under the tag Sequencer.
| nSize | The object size the compiler supplies. |
|
inlinestatic |
Release a sequencer under the tag Sequencer.
| pBlock | The block. |
|
inlinevirtual |
Send a copy of the message at the cursor stamped with its tick, then schedule the next.
The copy is deleted once the sink has handled it.
Implements GenericSequencer.
|
inline |
Record the clock and the sink and start sending the range.
The title is inferred.
| pClock | The clock to post against. |
| pSink | The sink every message goes to. |
|
inline |
Queue or send the message at the cursor.
Does nothing at the end of the range. The message's tick is the start tick plus its own position less mOffset, each sum brought into the finite range. A tick equal to the start tick is dispatched at once, and any other is posted, creating SequencerCmd on the first post. The title is inferred.
| T Sequencer< T >::mCursor |
The next object to send.
Public because MultiMusePlayer::PlayerFinished() compares it against mFinish from outside the hierarchy and the image exposes no accessor.
| T Sequencer< T >::mBegin |
First object of the range.
| T Sequencer< T >::mFinish |
One past the last object of the range.