![]() |
fpmas 1.6
|
#include <model.h>
Static Public Member Functions | |
static void | update (api::model::AgentPtr &local_agent, api::model::AgentPtr &&updated_agent) |
AgentPtr data update specialization.
In addition to move the updated agent data into the local agent, the update() method also updates the local agents groups.
|
inlinestatic |
Updates the local agent with the updated agent data.
The local agent groups are also updated according to the following rules:
updated_agent->groupIds()
but not in local_agent->groupIds()
(see api::model::AgentGroup::add())local_agent->groupIds()
but not in updated_agent->groupIds()
(see api::model::AgentGroup::remove())local_agent->groupIds()
is also updated according to the previous rules.
local_agent.tasks() and local_agent.groups() are assumed to stay consistent with the rules expressed above, since tasks are bound to agent groups to which the agent belong. Those fields are updated automatically by api::model::AgentGroup::add() and api::model::AgentGroup::remove().
Agent data is pulled from updated_agent
to local_agent
using the api::model::AgentPtr move assignment operator.
local_agent | reference to the local agent to update |
updated_agent | reference to the temporary updated agent |