fpmas 1.6
Public Member Functions | List of all members
fpmas::api::model::AgentPtr Class Reference

#include <model.h>

Inheritance diagram for fpmas::api::model::AgentPtr:
Inheritance graph
[legend]
Collaboration diagram for fpmas::api::model::AgentPtr:
Collaboration graph
[legend]

Public Member Functions

 AgentPtr ()
 
 AgentPtr (api::model::Agent *agent)
 
 AgentPtr (AgentPtr &&other)
 
 AgentPtr (const AgentPtr &other)
 
AgentPtroperator= (AgentPtr &&other)
 
AgentPtroperator= (const AgentPtr &)
 
 ~AgentPtr ()
 
- Public Member Functions inherited from fpmas::api::utils::PtrWrapper< api::model::Agent >
 PtrWrapper ()
 
 PtrWrapper (api::model::Agent *ptr)
 
api::model::Agentget ()
 
const api::model::Agentget () const
 
api::model::Agentrelease ()
 
api::model::Agentoperator-> ()
 
const api::model::Agentoperator-> () const
 
api::model::Agentoperator* ()
 
const api::model::Agentoperator* () const
 
 operator api::model::Agent * ()
 
 operator const api::model::Agent * () const
 

Additional Inherited Members

- Public Types inherited from fpmas::api::utils::PtrWrapper< api::model::Agent >
typedef api::model::Agent element_type
 
typedef api::model::Agentpointer
 
- Protected Attributes inherited from fpmas::api::utils::PtrWrapper< api::model::Agent >
api::model::Agentptr
 

Detailed Description

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

Constructor & Destructor Documentation

◆ AgentPtr() [1/4]

fpmas::api::model::AgentPtr::AgentPtr ( )
inline

Default AgentPtr constructor.

◆ AgentPtr() [2/4]

fpmas::api::model::AgentPtr::AgentPtr ( api::model::Agent agent)
inline

AgentPtr constructor.

Parameters
agentagent pointer to manage

◆ AgentPtr() [3/4]

fpmas::api::model::AgentPtr::AgentPtr ( AgentPtr &&  other)

Moves the internal Agent pointer from other to this.

Parameters
otherother 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
otherother pointer wrapper to copy from

◆ ~AgentPtr()

fpmas::api::model::AgentPtr::~AgentPtr ( )

Deletes the internal agent pointer if it's not null.

Member Function Documentation

◆ operator=() [1/2]

AgentPtr & fpmas::api::model::AgentPtr::operator= ( AgentPtr &&  other)

Moves other's agent data into this agent pointer, using Agent::moveAssign().

Parameters
otherother AgentPtr to move into this

◆ operator=() [2/2]

AgentPtr & fpmas::api::model::AgentPtr::operator= ( const AgentPtr other)

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
otherother pointer wrapper to copy from

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