Pol  Revision:3cfda13
Pol::Core::OneShotTask Class Referenceabstract

#include <schedule.h>

+ Inheritance diagram for Pol::Core::OneShotTask:

Public Member Functions

 OneShotTask (OneShotTask **handle, polclock_t run_when)
 
virtual void cancel (void) POL_OVERRIDE
 
- Public Member Functions inherited from Pol::Core::ScheduledTask
 ScheduledTask (polclock_t next_run_clock)
 
virtual ~ScheduledTask ()
 
polclock_t clocksleft (polclock_t now)
 
bool late (polclock_t now)
 
polclock_t next_run_clock () const
 
bool ready (polclock_t now)
 
polticks_t ticks_late (polclock_t now)
 
polticks_t ticks_left (polclock_t now) const
 

Protected Member Functions

virtual ~OneShotTask ()
 
virtual void execute (polclock_t now) POL_OVERRIDE
 
virtual void on_run ()=0
 

Private Attributes

OneShotTask ** handle
 

Additional Inherited Members

- Protected Attributes inherited from Pol::Core::ScheduledTask
bool cancelled
 
polclock_t last_run_clock_
 
polclock_t next_run_clock_
 

Detailed Description

Definition at line 95 of file schedule.h.

Constructor & Destructor Documentation

Pol::Core::OneShotTask::OneShotTask ( OneShotTask **  handle,
polclock_t  run_when 
)

Definition at line 125 of file schedule.cpp.

References Pol::Core::add_task(), and passert.

Pol::Core::OneShotTask::~OneShotTask ( )
protectedvirtual

Definition at line 137 of file schedule.cpp.

References handle.

Member Function Documentation

void Pol::Core::OneShotTask::execute ( polclock_t  now)
protectedvirtual

Implements Pol::Core::ScheduledTask.

Definition at line 150 of file schedule.cpp.

References cancel(), Pol::Core::ScheduledTask::cancelled, and on_run().

virtual void Pol::Core::OneShotTask::on_run ( )
protectedpure virtual

Implemented in Pol::Core::SpellTask, and Pol::Core::OneShotTaskInst< T >.

Referenced by execute().

Member Data Documentation

OneShotTask** Pol::Core::OneShotTask::handle
private

Definition at line 109 of file schedule.h.

Referenced by cancel(), and ~OneShotTask().


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