Class AgentID
Defined in File agent.h
Class Documentation
-
class AgentID
A unique identifier for each
Agent.The unique identifier permits ordering to allow
AgentIDs to be used as keys forstd::map. The unique identifier is unique for the session, however,AgentIDs are not guaranteed to be unique from session-to-session.See also
Public Functions
-
AgentID()
Constructs a new unique identifier.
Friends
-
friend bool operator==(const AgentID &lhs, const AgentID &rhs)
Test if two
AgentIDinstances are equal.- Parameters
lhs – is the left-hand side of the equality test.
rhs – is the right-hand side of the equality test.
- Returns
true is they are equal and false if not.
-
friend bool operator!=(const AgentID &lhs, const AgentID &rhs)
Test if two
AgentIDinstances are not equal.- Parameters
lhs – is the left-hand side of the equality test.
rhs – is the right-hand side of the equality test.
- Returns
true is they are not equal and false if they are.
-
friend bool operator<(const AgentID &lhs, const AgentID &rhs)
Test if one AgentID is less than another.
Due to the way AgentID instances are used internally, the AgentID must be orderable. The
<operator provides a basic ordering sufficient forstd::map.- Parameters
lhs – is the left-hand side of the ordering test.
rhs – is the right-hand side of the ordering test.
- Returns
true if
lhsis “less than”rhsas determined by the underlying implementation of theAgentID.
-
friend std::ostream &operator<<(std::ostream &lhs, const AgentID &rhs)
Output an AgentID to the specified output stream.
The form of the output will be the same as that produced by the
to_string()member function.
-
AgentID()