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

A helper class of GlobalEvent. More...

#include <GlobalEvent.hpp>

Public Member Functions

 GlobalEventProxy (const GlobalEventProxy &)=default
 
GlobalEventProxyoperator= (const GlobalEventProxy &)=default
 
template<SchedulingPhase sched_phase_T = SchedulingPhase::Update>
 GlobalEventProxy (const utils::LifeTracker< SpartaHandler > &handler)
 
void operator() (void) const
 function call operator of GlobalEventProxy
 
const SchedulingPhasegetSchedulingPhase () const
 

Detailed Description

A helper class of GlobalEvent.

GlobalEventProxy itself monitors a event handler and remembers its scheduling phase. It triggers the event callback only when it still exists (with the help of std::weak_ptr) It appears as an "event" payload of sparta::PhasedPayloadEvent in the sparta::Scheduler.

Definition at line 32 of file GlobalEvent.hpp.

Constructor & Destructor Documentation

◆ GlobalEventProxy()

template<SchedulingPhase sched_phase_T = SchedulingPhase::Update>
sparta::GlobalEventProxy::GlobalEventProxy ( const utils::LifeTracker< SpartaHandler > &  handler)
inline

Definition at line 40 of file GlobalEvent.hpp.

Member Function Documentation

◆ getSchedulingPhase()

const SchedulingPhase & sparta::GlobalEventProxy::getSchedulingPhase ( ) const
inline

Definition at line 59 of file GlobalEvent.hpp.

◆ operator()()

void sparta::GlobalEventProxy::operator() ( void  ) const
inline

function call operator of GlobalEventProxy

It supports the "dynamic" event scheduling semantic provided by sparta::GlobalEvent by triggering the event callback only when it still exists (with the help of std::weak_ptr)

Definition at line 51 of file GlobalEvent.hpp.


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