The Sparta Modeling Framework
Loading...
Searching...
No Matches
sparta::EventGroup Class Reference

Group a series of events together for precedence establishment. More...

#include <Precedence.hpp>

Inheritance diagram for sparta::EventGroup:
Collaboration diagram for sparta::EventGroup:

Public Member Functions

template<class ScheduleableT , class ... ArgsT>
 EventGroup (ScheduleableT &sched, ArgsT &...scheds)
 Construct the EventGroup.
 
template<class DataT , SchedulingPhase PhaseT, class ... ArgsT>
 EventGroup (PayloadEvent< DataT, PhaseT > &sched, ArgsT &...scheds)
 Construct the EventGroup.
 

Detailed Description

Group a series of events together for precedence establishment.

This class is used to group Scheduleable types and PayloadEvents and establish a precedence between each event in the group with either another group or a singular Scheduleable type. Example:

// Make each producer come before each consumer
sparta::EventGroup(prod0, prod1, prod2) >> sparta::EventGroup(cons0, cons1, cons2);
// This is the same as doing this:
prod0 >> cons0;
prod0 >> cons1;
prod0 >> cons2;
prod1 >> cons0;
prod1 >> cons1;
prod1 >> cons2;
prod2 >> cons0;
prod2 >> cons1;
prod2 >> cons2;
Group a series of events together for precedence establishment.
Event is a simple class for scheduling random events on the Scheduler.
Definition Event.hpp:42

Definition at line 1041 of file Precedence.hpp.

Constructor & Destructor Documentation

◆ EventGroup() [1/2]

template<class ScheduleableT , class ... ArgsT>
sparta::EventGroup::EventGroup ( ScheduleableT &  sched,
ArgsT &...  scheds 
)
inlineexplicit

Construct the EventGroup.

Parameters
schedThe first scheduleable
schedsThe remaining scheduleables

This is a variatic template constructor. You can crate a group class with as many Event types as possible. Examples:

sparta::EventGroup(event2, event3, event4);

Definition at line 1099 of file Precedence.hpp.

◆ EventGroup() [2/2]

template<class DataT , SchedulingPhase PhaseT, class ... ArgsT>
sparta::EventGroup::EventGroup ( PayloadEvent< DataT, PhaseT > &  sched,
ArgsT &...  scheds 
)
inlineexplicit

Construct the EventGroup.

Parameters
schedThe first scheduleable (if a PayloadEvent)
schedsThe remaining scheduleables

This is a variatic template constructor. You can crate a group class with as many Event types as possible. Examples:

sparta::EventGroup(event2, event3, event4);

Definition at line 1124 of file Precedence.hpp.


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