7 #ifndef FIPA_ACL_AGENTID_H 8 #define FIPA_ACL_AGENTID_H 46 std::vector<std::string> mAddresses;
49 AgentIDList mResolvers;
52 std::vector<UserdefParam> mParameters;
82 AgentID(
const std::string& name);
97 void setName(
const std::string& name);
110 const std::vector<std::string>&
getAddresses()
const {
return mAddresses; }
115 void setAddresses(
const std::vector<std::string>& addresses) { mAddresses = addresses; }
132 void setResolvers(
const Resolvers& resolvers) { mResolvers = resolvers; }
196 std::string
toString(
size_t indent = 0)
const;
200 template<
typename C,
typename E>
201 std::basic_ostream<C, E>& operator<<(std::basic_ostream<C,E>& out,
const AgentID& agent)
203 out <<
"AgentID<" << agent.
getName() <<
">";
207 template<
typename C,
typename E>
208 std::basic_ostream<C, E>& operator<<(std::basic_ostream<C,E>& out,
const AgentIDList& agents)
210 AgentIDList::const_iterator cit = agents.begin();
212 for(; cit != agents.end(); ++cit)
AgentID()
Default constructor.
void deleteResolver(const AgentID &id)
Delete a resolver.
void setName(const std::string &name)
the method checks whether the passed name string is a word or not(according to the fipa spec) ...
const Resolvers & getResolvers() const
Get list of resolvers.
bool empty() const
Check if AgentId is empty, i.e. does not contain a name.
static bool compareEqual(const AgentID &a, const AgentID &b, int depth)
alternative function for equality operator; the depth can be specified through the depth param ...
void addResolver(const AgentID &aid)
Add resolver.
const std::string & getName() const
setter and getter methods for all fields; they do not result in deep-copies assignments/retreivals, but this can be easily changed if needed through the overloaded operator which do
void addAddress(const std::string &adr)
the method checks whether the passed address string is a word or not(according to the fipa spec) ...
bool operator==(const AgentID &other) const
overloaded equality operator for AgentID; the signature of the function was intentionally changed fro...
std::vector< AgentID > AgentIDList
bool operator<(const AgentID &other) const
Allow comparing two agents, based on the agent name only.
void addUserdefParam(const UserdefParam &p)
Add a userdefined parameter.
const std::vector< std::string > & getAddresses() const
Retrieve list of addresses.
bool operator!=(const AgentID &other) const
Allow testing on inequality of agents based on the agents' names only.
void setUserdefParams(const std::vector< UserdefParam > ¶ms)
static const std::string UNDEFINED
void setResolvers(const Resolvers &resolvers)
Set list of resolvers.
static int msResolverComparisonDepth
std::vector< std::string > Addresses
This class provides a representation of a message conforming to the FIPA specification SC00061...
overloaded equality operator for UserdefParam class objects
const std::vector< UserdefParam > & getUserdefParams() const
Get the all userdefined parameter.
std::string toString(size_t indent=0) const
void setAddresses(const std::vector< std::string > &addresses)
Set list of addresses – overwrites existing list of addresses.
defines the UserdefParam class
Implements the general AgentID functionality, which is present throughout the fipa specifications(FIP...
Foundation of Physical Intelligent Agents.