4 #include <Poco/Exception.h>
39 return std::to_string(m_value).at(0) -
'0';
44 return parse64(std::to_string(m_value / 10).substr(1));
47 static GatewayID parse(
const std::string &s);
49 std::string toString()
const
51 return std::to_string(m_value);
54 bool operator !=(
const GatewayID &
id)
const
56 return m_value !=
id.m_value;
59 bool operator ==(
const GatewayID &
id)
const
61 return m_value ==
id.m_value;
64 bool operator <(
const GatewayID &
id)
const
66 return m_value <
id.m_value;
69 bool operator >(
const GatewayID &
id)
const
71 return m_value >
id.m_value;
74 bool operator <=(
const GatewayID &
id)
const
76 return m_value <=
id.m_value;
79 bool operator >=(
const GatewayID &
id)
const
81 return m_value >=
id.m_value;
84 operator unsigned long long()
const
86 return (
unsigned long long) m_value;
89 operator uint64_t()
const
102 static uint64_t parse64(
const std::string &s);
static GatewayID random(int version=1, uint32_t seed=0)
Definition: GatewayID.cpp:69
Definition: GatewayID.h:14