1 #ifndef FIPA_ACL_ROLE_H 2 #define FIPA_ACL_ROLE_H 6 #include <fipa_acl/message_generator/agent_id.h> 13 typedef std::string
RoleId;
37 Role(
const RoleId&
id);
47 static const Role self();
52 RoleId
getId()
const {
return mId; }
62 return mId < other.mId;
67 return !(mId == other.mId);
72 return mId == other.mId;
102 std::map<Role, AgentIDList> mExpectedAgentMapping;
114 const std::map<Role, AgentIDList>&
getMapping()
const {
return mExpectedAgentMapping; }
119 void setSelf(
const AgentID&
id);
124 bool isSelf(
const AgentID&
id)
const;
134 void addRole(
const Role& role);
139 void addExpectedAgent(
const Role& role,
const AgentID& agent);
144 void clearExpectedAgents(
const Role& role);
151 void resetExpectedAgents();
163 bool isExpected(
const Role& role,
const AgentID& agent)
const;
173 #endif // FIPA_ACL_ROLE_H
bool operator!=(const Role &other) const
Role & operator=(const Role &other)
std::vector< AgentID > AgentIDList
Mapping between roles and actual agent ids.
bool operator==(const Role &other) const
bool operator<(const Role &other) const
static const RoleId UNDEFINED_ID
static const RoleId SELF_ID
Implements the general AgentID functionality, which is present throughout the fipa specifications(FIP...
Foundation of Physical Intelligent Agents.
const std::map< Role, AgentIDList > & getMapping() const
std::string toString() const