|
resonance 1.0.1
|
Replay of a recorded command stream that Sch::Scheduler::StartPlayback() installs. More...
#include <playbacker.h>
Public Member Functions | |
| Playbacker (Scheduler *pWatchdog) | |
| ~Playbacker () | |
| Release every loaded wrapper through Attachment::ReleaseIfSet() and empty mCommands. | |
| void | Load (IBStream &stream) |
| Read the recorded wrappers from a stream. | |
| void | Play () |
| Rewind the scheduler's clock and queue every loaded wrapper. | |
Replay of a recorded command stream that Sch::Scheduler::StartPlayback() installs.
The class is not polymorphic and emits no RTTI. Its name comes from the debugging symbols of the North American demo release. The object is 0x14 bytes and is allocated with the untagged allocator. Load() reads the recorded wrappers into mCommands, stopping at the EndRecordingCmd that ends a recording, and Play() rewinds the scheduler's clock and queues every wrapper on the scheduler.
|
explicit |
| pWatchdog | The scheduler the commands are replayed on. |
| Sch::Playbacker::~Playbacker | ( | ) |
Release every loaded wrapper through Attachment::ReleaseIfSet() and empty mCommands.
| void Sch::Playbacker::Load | ( | IBStream & | stream | ) |
Read the recorded wrappers from a stream.
Empties mCommands, then reads one Sch::TimedCommand after another until the stream reaches its end or a wrapper holds a command whose CmdID() is 6, the identifier of EndRecordingCmd. The wrapper that stops the loop is deleted. Each wrapper kept has its handle reserved through Sch::CmdID::ReserveID(). mCursor is left at the first wrapper. The title is inferred.
| stream | The recording. |
| void Sch::Playbacker::Play | ( | ) |
Rewind the scheduler's clock and queue every loaded wrapper.
Pauses the clock, restarts it at zero, queues each wrapper from mCursor on, and resumes the clock.