fpmas 1.6
Public Member Functions | List of all members
fpmas::model::detail::SetAgentDistantCallback Class Reference

#include <model.h>

Inheritance diagram for fpmas::model::detail::SetAgentDistantCallback:
Inheritance graph
[legend]
Collaboration diagram for fpmas::model::detail::SetAgentDistantCallback:
Collaboration graph
[legend]

Public Member Functions

 SetAgentDistantCallback (api::model::Model &model)
 
void call (const api::graph::SetDistantNodeEvent< AgentPtr > &event) override
 
- Public Member Functions inherited from fpmas::api::utils::Callback< const api::graph::SetDistantNodeEvent< AgentPtr > & >
virtual void call (Args... args)=0
 

Additional Inherited Members

- Public Types inherited from fpmas::api::utils::EventCallback< api::graph::SetDistantNodeEvent< AgentPtr > >
typedef api::graph::SetDistantNodeEvent< AgentPtr > EventType
 

Detailed Description

Callback triggered when an AgentNode is set DISTANT.

This happens when a previously LOCAL node is exported to an other process, or when a DISTANT node is inserted into the graph upon edge import.

Constructor & Destructor Documentation

◆ SetAgentDistantCallback()

fpmas::model::detail::SetAgentDistantCallback::SetAgentDistantCallback ( api::model::Model model)
inline

SetAgentDistantCallback constructor.

Parameters
modelcurrent model

Member Function Documentation

◆ call()

void fpmas::model::detail::SetAgentDistantCallback::call ( const api::graph::SetDistantNodeEvent< AgentPtr > &  event)
override

Unschedules the associated agent's task.

Notice that when a node goes DISTANT, it is still contained in the simulation graph as any other node. However, it must not be executed, since only LOCAL agents are assumed to be executed by the local process.

Parameters
eventevent to handle
See also
AgentTask
fpmas::api::model::Agent::task()
fpmas::api::model::AgentGroup::job()

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