17namespace subscription {
35 bool isValid() const noexcept {
return _value != 0; }
41 static std::atomic<TokenType> next_token{ 1 };
76template <>
struct hash<eduart::subscription::SubscriberToken> {
Opaque token identifying a subscription (state or device group).
Definition SubscriberToken.hpp:22
unsigned long long TokenType
Token type.
Definition SubscriberToken.hpp:24
bool isValid() const noexcept
Check if the token is valid (non-zero).
Definition SubscriberToken.hpp:35
bool operator!=(const SubscriberToken &other) const noexcept
Inequality comparison operators for SubscriberToken.
Definition SubscriberToken.hpp:54
TokenType value() const noexcept
Underlying value for hashing and comparison.
Definition SubscriberToken.hpp:48
static SubscriberToken getNextToken() noexcept
Get the next token.
Definition SubscriberToken.hpp:40
SubscriberToken() noexcept
Default construction (invalid token, value 0).
Definition SubscriberToken.hpp:29
bool operator==(const SubscriberToken &other) const noexcept
Equality comparison operators for SubscriberToken.
Definition SubscriberToken.hpp:51
std::size_t operator()(const eduart::subscription::SubscriberToken &token) const noexcept
Compute hash value for a SubscriberToken.
Definition SubscriberToken.hpp:82