80 , uint16_t time_hi_and_version_
82 , uint8_t c0, uint8_t c1, uint8_t c2, uint8_t c3, uint8_t c4, uint8_t c5
90 strncpy(m_name, name,
sizeof(m_name));
96 strncpy(m_name, copied.m_name,
sizeof(m_name));
101 static_cast<UUID&
>(*this) = copied;
108 return static_cast<const UUID&
>(*this) == compared;
113 return !(
static_cast<const UUID&
>(*this) == compared);
116 const char*
getName()
const {
return m_name; }
125 #define DEFINE_UUID(TYPE, NAME, l, s0, s1, s2, c0,c1,c2,c3,c4,c5) \
126 static const TYPE NAME(0x##l, 0x##s0, 0x##s1, 0x##s2, \
127 0x##c0, 0x##c1, 0x##c2, 0x##c3, 0x##c4, 0x##c0, #NAME);
129 #define DEFINE_NAMED_UUID_CLASS(NAME) \
130 class NAME : public NamedUUID \
133 NAME(uint32_t time_low_ \
134 , uint16_t time_mid_ \
135 , uint16_t time_hi_and_version_ \
136 , uint16_t clock_seq_ \
137 , uint8_t c0, uint8_t c1, uint8_t c2, uint8_t c3, uint8_t c4, uint8_t c5 \
138 , const char* name) \
139 : NamedUUID(time_low_, time_mid_, time_hi_and_version_, clock_seq_, \
140 c0, c1, c2, c3, c4, c5, name) \
148 #endif // _ARGUS_UUID_H
NamedUUID(const NamedUUID &copied)
bool operator<(const UUID &l, const UUID &r)
uint16_t time_hi_and_version
bool operator==(const UUID &l, const UUID &r)
bool operator==(const NamedUUID &compared) const
NamedUUID(uint32_t time_low_, uint16_t time_mid_, uint16_t time_hi_and_version_, uint16_t clock_seq_, uint8_t c0, uint8_t c1, uint8_t c2, uint8_t c3, uint8_t c4, uint8_t c5, const char *name)
const char * getName() const
const uint32_t MAX_UUID_NAME_SIZE
A unique identifier with a name (primarily for debugging purposes).
bool operator!=(const NamedUUID &compared) const
NamedUUID & operator=(const NamedUUID &copied)