17 #ifndef TRANSPORT_PROTOCOL_ID_HPP_
18 #define TRANSPORT_PROTOCOL_ID_HPP_
22 #include "kaa/gen/EndpointGen.hpp"
33 : id_(id), version_(version) {}
36 : id_(protocolId.id), version_(protocolId.version) {}
47 return (id_ == protocolId.id_ && version_ == protocolId.version_);
51 return !(*
this == protocolId);
55 return (hashCode() < protocolId.hashCode());
59 return (hashCode() > protocolId.hashCode());
63 std::uint32_t hashCode()
const {
64 const std::uint32_t prime = 31;
66 std::uint32_t hashCode = 1;
67 hashCode = prime * hashCode + id_;
68 hashCode = prime * hashCode + version_;
75 std::int32_t version_;
TransportProtocolId(const ProtocolVersionPair &protocolId)
bool operator!=(const TransportProtocolId &protocolId) const
std::int32_t getId() const
bool operator<(const TransportProtocolId &protocolId) const
bool operator==(const TransportProtocolId &protocolId) const
std::int32_t getVersion() const
TransportProtocolId(const std::int32_t &id, const std::int32_t &version)
bool operator>(const TransportProtocolId &protocolId) const