10 #include <boost/uuid/uuid.hpp> 11 #include <duds/LanguageTaggedString.hpp> 27 LanguageTaggedStringSet
name;
29 void setUuid(
const boost::uuids::uuid &u);
33 void setNames(
const LanguageTaggedStringSet &n);
41 Identity(
const boost::uuids::uuid &u);
42 Identity(
const LanguageTaggedStringSet &n,
bool genUuid =
false);
43 Identity(
const boost::uuids::uuid &u,
const LanguageTaggedStringSet &n);
47 const boost::uuids::uuid &
getUuid()
const {
53 const LanguageTaggedStringSet &
getNames()
const {
76 return uuid <= i.
uuid;
82 return uuid >= i.
uuid;
88 return uuid == i.
uuid;
94 return uuid != i.
uuid;
bool operator==(const Identity &i) const
Identity objects are compared using the uuid member.
std::string getName() const
Returns the name for the current locale.
LanguageTaggedStringSet name
A name for this item intended for user presentation.
const LanguageTaggedStringSet & getNames() const
Returns the set of names for all locales and languages.
bool operator>=(const Identity &i) const
Identity objects are compared using the uuid member.
bool operator<(const Identity &i) const
Identity objects are compared using the uuid member.
bool operator!=(const Identity &i) const
Identity objects are compared using the uuid member.
LanguageTaggedStringSet & getNames()
bool operator<=(const Identity &i) const
Identity objects are compared using the uuid member.
bool operator>(const Identity &i) const
Identity objects are compared using the uuid member.
The identification for something that is unique across all peers.
boost::uuids::uuid uuid
A unique identifier that is valid across all peers.
const boost::uuids::uuid & getUuid() const
Returns the object's unique identifier.
void setUuid(const boost::uuids::uuid &u)
void setNames(const LanguageTaggedStringSet &n)