RepastHPC
2.3.1
|
Encapsulates the status (moved or removed) of agent in order to synchronize that status across processes. More...
#include <AgentStatus.h>
Public Types | |
enum | Status { REMOVED, MOVED } |
Enum indicating the status of th agent. | |
Public Member Functions | |
AgentStatus () | |
No-arg constructor for serialization. | |
AgentStatus (AgentId id) | |
Creates an AgentStatus indicating the status for the specified agent. More... | |
AgentStatus (AgentId old, AgentId newId) | |
Creates an AgentStatus indicating the status for the specified agent and the new id of that agent as result from the change in status. More... | |
Status | getStatus () const |
Gets the status. More... | |
const AgentId & | getId () const |
Gets the id of the agent that this is the status for. More... | |
const AgentId & | getOldId () const |
Gets the old id of the agent that this is the status for, if this contains an old and updated AgentId. More... | |
const AgentId & | getNewId () const |
Gets the new updated id of the agent that this is the status for, if this contains an old and updated AgentId. More... | |
Friends | |
class | boost::serialization::access |
bool | operator< (const AgentStatus &one, const AgentStatus &two) |
Comparison operator that can be used in sorts, etc. | |
Encapsulates the status (moved or removed) of agent in order to synchronize that status across processes.
repast::AgentStatus::AgentStatus | ( | AgentId | id | ) |
Creates an AgentStatus indicating the status for the specified agent.
id | the id of the agent whose status this represents |
Creates an AgentStatus indicating the status for the specified agent and the new id of that agent as result from the change in status.
When an agent moves between processes its current rank may change and thus the current rank part of its id will change.
old | the id of the agent whose status this represents |
newId | the new id of the agent that results from its status change |
|
inline |
Gets the id of the agent that this is the status for.
|
inline |
|
inline |
|
inline |
Gets the status.