EventScheduler Class Reference

#include <EventScheduler.h>

Inheritance diagram for EventScheduler:

EventContext

List of all members.

Public Member Functions

void reset ()
void clock ()
bool isPending (Event &event) const
event_clock_t getTime (event_phase_t phase) const
event_clock_t getTime (event_clock_t clock, event_phase_t phase) const
event_phase_t phase () const

Protected Member Functions

void schedule (Event &event, event_clock_t cycles, event_phase_t phase)
void schedule (Event &event, event_clock_t cycles)
void cancel (Event &event)


Detailed Description

Fast EventScheduler implementation

Author:
Antti S. Lankila

Member Function Documentation

void EventScheduler::cancel ( Event event  )  [protected, virtual]

Cancel the specified event.

Parameters:
event the event to cancel

Implements EventContext.

void EventScheduler::clock (  )  [inline]

Fire next event, advance system time to that event.

event_clock_t EventScheduler::getTime ( event_clock_t  clock,
event_phase_t  phase 
) const [inline, virtual]

Get clocks since specified clock in given phase.

Parameters:
clock the time to compare to
phase the phase to comapre to
Returns:
the time between specified clock and now

Implements EventContext.

event_clock_t EventScheduler::getTime ( event_phase_t  phase  )  const [inline, virtual]

Get time with respect to a specific clock phase.

Parameters:
phase the phase
Returns:
the time according to specified phase.

Implements EventContext.

bool EventScheduler::isPending ( Event event  )  const [virtual]

Is the event pending in this scheduler?

Parameters:
event the event
Returns:
true when pending

Implements EventContext.

event_phase_t EventScheduler::phase (  )  const [inline, virtual]

Return current clock phase.

Returns:
The current phase

Implements EventContext.

void EventScheduler::reset (  ) 

Cancel all pending events and reset time.

void EventScheduler::schedule ( Event event,
event_clock_t  cycles 
) [inline, protected, virtual]

Add event to pending queue in the same phase as current event.

Parameters:
event the event to add
cycles how many cycles from now to fire

Implements EventContext.

void EventScheduler::schedule ( Event event,
event_clock_t  cycles,
event_phase_t  phase 
) [inline, protected, virtual]

Add event to pending queue.

At PHI2, specify cycles=0 and Phase=PHI1 to fire on the very next PHI1.

Parameters:
event the event to add
cycles how many cycles from now to fire
phase the phase when to fire the event

Implements EventContext.


The documentation for this class was generated from the following files:

Generated on Sun Jul 14 23:12:59 2013 for libsidplayfp by  doxygen 1.5.9