fpmas 1.6
Public Member Functions | List of all members
fpmas::scheduler::TaskBase< TaskInterface > Class Template Reference

#include <scheduler.h>

Inheritance diagram for fpmas::scheduler::TaskBase< TaskInterface >:
Inheritance graph
[legend]
Collaboration diagram for fpmas::scheduler::TaskBase< TaskInterface >:
Collaboration graph
[legend]

Public Member Functions

void setJobPos (JID job_id, std::list< fpmas::api::scheduler::Task * >::iterator pos) override
 
std::list< api::scheduler::Task * >::iterator getJobPos (JID job_id) const override
 

Detailed Description

template<typename TaskInterface>
class fpmas::scheduler::TaskBase< TaskInterface >

Base task implementation.

Only the setJobPos() and getJobPos() methods are implemented.

Template Parameters
TaskInterfaceimplemented task interface (e.g. fpmas::api::scheduler::Task or fpmas::api::scheduler::NodeTask)

Member Function Documentation

◆ setJobPos()

template<typename TaskInterface >
void fpmas::scheduler::TaskBase< TaskInterface >::setJobPos ( JID  job_id,
std::list< fpmas::api::scheduler::Task * >::iterator  pos 
)
inlineoverride

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()

template<typename TaskInterface >
std::list< api::scheduler::Task * >::iterator fpmas::scheduler::TaskBase< TaskInterface >::getJobPos ( JID  job_id) const
inlineoverride

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: