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

#include <scheduler.h>

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

Public Types

typedef std::vector< constJob * >::const_iterator JobIterator
 

Public Member Functions

virtual void submit (const Job &job, SubTimeStep sub_time_step)=0
 
virtual void submit (JobList job_list, SubTimeStep sub_time_step)=0
 
virtual const std::vector< const Job * > & jobs () const =0
 
virtual JobIterator begin () const =0
 
virtual JobIterator end () const =0
 
virtual size_t jobCount ()=0
 
virtual void clear ()=0
 

Detailed Description

Epoch API.

An Epoch describes an ordered set of Job that needs to be executed at a given Date.

Member Typedef Documentation

◆ JobIterator

typedef std::vector<constJob*>::const_iterator fpmas::api::scheduler::Epoch::JobIterator

Type used to iterate on an Epoch, yielding epoch's jobs.

Member Function Documentation

◆ submit() [1/2]

virtual void fpmas::api::scheduler::Epoch::submit ( const Job job,
SubTimeStep  sub_time_step 
)
pure virtual

Submits a new job to this Epoch.

Jobs within the Epoch are ordered according to the specified sub_time_step. The result of jobs() and the begin() / end() iterators are consistent with this order. If several jobs are submitted with equal sub_time_steps, their relative ordering corresponds to the order they are submitted. However it is risky to rely on this, since float comparison can be approximate.

Parameters
jobjob to submit
sub_time_stepvalue used to order jobs within the Epoch

Implemented in fpmas::scheduler::Epoch.

◆ submit() [2/2]

virtual void fpmas::api::scheduler::Epoch::submit ( JobList  job_list,
SubTimeStep  sub_time_step 
)
pure virtual

Submits a list of job to be executed sequentially in this Epoch.

Jobs within the Epoch are ordered according to the specified sub_time_step. The result of jobs() and the begin() / end() iterators are consistent with this order. If several jobs are submitted with equal sub_time_steps, their relative ordering corresponds to the order they are submitted. However it is risky to rely on this, since float comparison can be approximate.

Parameters
job_listlist of jobs to submit
sub_time_stepvalue used to order jobs within the Epoch

Implemented in fpmas::scheduler::Epoch.

◆ jobs()

virtual const std::vector< const Job * > & fpmas::api::scheduler::Epoch::jobs ( ) const
pure virtual

Returns a reference to the internal Jobs list.

Returns
current jobs list

Implemented in fpmas::scheduler::Epoch.

◆ begin()

virtual JobIterator fpmas::api::scheduler::Epoch::begin ( ) const
pure virtual

Returns a begin iterator to the epoch's jobs.

Returns
begin iterator

Implemented in fpmas::scheduler::Epoch.

◆ end()

virtual JobIterator fpmas::api::scheduler::Epoch::end ( ) const
pure virtual

Returns an end iterator to the epoch's jobs.

Returns
end iterator

Implemented in fpmas::scheduler::Epoch.

◆ jobCount()

virtual size_t fpmas::api::scheduler::Epoch::jobCount ( )
pure virtual

Returns the current number of jobs in the Epoch.

Returns
job count

Implemented in fpmas::scheduler::Epoch.

◆ clear()

virtual void fpmas::api::scheduler::Epoch::clear ( )
pure virtual

Clears the Epoch, removing all jobs currently submitted.

Implemented in fpmas::scheduler::Epoch.


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