Class AgentID
Defined in File agent.h
Class Documentation
-
class AgentID
A unique identifier for each
Agent
.The unique identifier permits ordering to allow
AgentID
s to be used as keys forstd::map
. The unique identifier is unique for the session, however,AgentID
s 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
AgentID
instances 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
AgentID
instances 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
lhs
is “less than”rhs
as 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()