#include <model.h>
A smart pointer used to manage an Agent pointer.
This type can be used as a datatype T within an api::graph::DistributedGraph.
- See also
- AgentNode
-
AgentGraph
◆ AgentPtr() [1/4]
fpmas::api::model::AgentPtr::AgentPtr |
( |
| ) |
|
|
inline |
◆ AgentPtr() [2/4]
AgentPtr constructor.
- Parameters
-
agent | agent pointer to manage |
◆ AgentPtr() [3/4]
fpmas::api::model::AgentPtr::AgentPtr |
( |
AgentPtr && |
other | ) |
|
Moves the internal Agent pointer from other to this.
- Parameters
-
other | other pointer wrapper to move from |
◆ AgentPtr() [4/4]
fpmas::api::model::AgentPtr::AgentPtr |
( |
const AgentPtr & |
other | ) |
|
Copies the other internal agent pointer data to this, using Agent::copy().
Must be used only for serialization purpose. (for example when data is copied to an MPI buffer through a synchro::DataUpdatePack instance)
Only the Agent data and its GroupId is copied, but task, node or graph fields of the copied agent is left undefined, and so the original task associated to other's agent is not rebound to the copied agent.
- Parameters
-
other | other pointer wrapper to copy from |
◆ ~AgentPtr()
fpmas::api::model::AgentPtr::~AgentPtr |
( |
| ) |
|
Deletes the internal agent pointer if it's not null.
◆ operator=() [1/2]
◆ operator=() [2/2]
Copies the other internal agent pointer data to this, following the same rules as AgentPtr(const AgentPtr&).
Also deletes the old agent pointer if it was not null.
- Parameters
-
other | other pointer wrapper to copy from |
The documentation for this class was generated from the following files:
- src/fpmas/api/model/model.h
- src/fpmas/api/model/model.cpp