fpmas 1.6
Public Member Functions | List of all members
fpmas::api::scheduler::Task Class Referenceabstract

#include <scheduler.h>

Inheritance diagram for fpmas::api::scheduler::Task:
Inheritance graph
[legend]

Public Member Functions

virtual void run ()=0
 
virtual void setJobPos (JID job_id, std::list< Task * >::iterator pos)=0
 
virtual std::list< Task * >::iterator getJobPos (JID job_id) const =0
 

Detailed Description

Task API.

Member Function Documentation

◆ run()

virtual void fpmas::api::scheduler::Task::run ( )
pure virtual

◆ setJobPos()

virtual void fpmas::api::scheduler::Task::setJobPos ( JID  job_id,
std::list< Task * >::iterator  pos 
)
pure virtual

Sets a list position associated to the Job represented by job_id, that can be retrieved with getJobPos().

There is no specific requirement about those methods, that can be used or not. However, Job implementations can take advantage of this feature to optimize Task insertion and removal in constant time, using an std::list as an internal data structure.

Parameters
job_idJob ID
poslist iterator that references the current Task within the job associated to job_id

◆ getJobPos()

virtual std::list< Task * >::iterator fpmas::api::scheduler::Task::getJobPos ( JID  job_id) const
pure virtual

Retrieves a list position that was previously stored using setJobPos().

Parameters
job_idJob ID
Returns
list iterator that references the current Task within the job associated to job_id

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