openMSX
|
Every class that wants to get scheduled at some point must inherit from this class. More...
#include <Schedulable.hh>
Public Member Functions | |
Schedulable (const Schedulable &)=delete | |
Schedulable (Schedulable &&)=delete | |
Schedulable & | operator= (const Schedulable &)=delete |
Schedulable & | operator= (Schedulable &&)=delete |
virtual void | executeUntil (EmuTime::param time)=0 |
When the previously registered syncPoint is reached, this method gets called. | |
virtual void | schedulerDeleted () |
Just before the the Scheduler is deleted, it calls this method of all the Schedulables that are still registered. | |
Scheduler & | getScheduler () const |
EmuTime::param | getCurrentTime () const |
Convenience method: This is the same as getScheduler().getCurrentTime(). | |
template<typename Archive > | |
void | serialize (Archive &ar, unsigned version) |
Static Public Member Functions | |
template<typename Archive > | |
static std::vector< SyncPointBW > | serializeBW (Archive &ar) |
template<typename Archive > | |
static void | restoreOld (Archive &ar, std::vector< Schedulable * > schedulables) |
Protected Member Functions | |
Schedulable (Scheduler &scheduler) | |
~Schedulable () | |
void | setSyncPoint (EmuTime::param timestamp) |
bool | removeSyncPoint () |
void | removeSyncPoints () |
bool | pendingSyncPoint () const |
bool | pendingSyncPoint (EmuTime &result) const |
Every class that wants to get scheduled at some point must inherit from this class.
Definition at line 33 of file Schedulable.hh.
|
delete |
|
delete |
|
explicitprotected |
Definition at line 7 of file Schedulable.cc.
|
protected |
Definition at line 12 of file Schedulable.cc.
References removeSyncPoints().
|
pure virtual |
When the previously registered syncPoint is reached, this method gets called.
EmuTime::param openmsx::Schedulable::getCurrentTime | ( | ) | const |
Convenience method: This is the same as getScheduler().getCurrentTime().
Definition at line 49 of file Schedulable.cc.
References openmsx::Scheduler::getCurrentTime().
Referenced by openmsx::EventDelay::flush(), openmsx::MSXMixer::reInit(), openmsx::AfterTimedCmd::reschedule(), openmsx::RealTime::resync(), openmsx::WD2793::serialize(), and openmsx::Y8950Adpcm::serialize().
|
inline |
Definition at line 60 of file Schedulable.hh.
|
delete |
|
delete |
|
protected |
Definition at line 38 of file Schedulable.cc.
|
protected |
Definition at line 44 of file Schedulable.cc.
|
protected |
Definition at line 28 of file Schedulable.cc.
Referenced by openmsx::RealTime::disable(), openmsx::AfterTimedCmd::reschedule(), openmsx::WD2793::reset(), openmsx::Y8950Adpcm::reset(), openmsx::RealTime::resync(), openmsx::WD2793::serialize(), openmsx::Y8950Adpcm::serialize(), openmsx::WD2793::setCommandReg(), and openmsx::Y8950Adpcm::writeReg().
|
protected |
Definition at line 33 of file Schedulable.cc.
Referenced by openmsx::EventDelay::flush(), serialize(), and ~Schedulable().
|
inlinestatic |
Definition at line 79 of file Schedulable.hh.
References serializeBW().
Referenced by openmsx::RealDrive::serialize(), openmsx::LaserdiscPlayer::serialize(), openmsx::I8251::serialize(), openmsx::V9990::serialize(), and openmsx::VDP::serialize().
|
virtual |
Just before the the Scheduler is deleted, it calls this method of all the Schedulables that are still registered.
If you override this method you should unregister this Schedulable in the implementation. The default implementation just prints a diagnostic (and soon after the Scheduler will trigger an assert that there are still registered Schedulables. Normally there are easier ways to unregister a Schedulable. ATM this method is only used in AfterCommand (because it's not part of the MSX machine).
Definition at line 17 of file Schedulable.cc.
void openmsx::Schedulable::serialize | ( | Archive & | ar, |
unsigned | version | ||
) |
Definition at line 55 of file Schedulable.cc.
References removeSyncPoints(), and setSyncPoint().
|
inlinestatic |
Definition at line 70 of file Schedulable.hh.
Referenced by restoreOld(), and openmsx::WD2793::serialize().
|
protected |
Definition at line 23 of file Schedulable.cc.
Referenced by openmsx::AfterTimedCmd::reschedule(), openmsx::RealTime::resync(), openmsx::PostProcessor::rotateFrames(), openmsx::WD2793::serialize(), serialize(), openmsx::FastForwardHelper::setTarget(), and openmsx::EventDelay::sync().