Hash function (functor) for CommAddress objets. More...
#include <CommAddress.h>
Public Member Functions | |
size_t | operator() (const CommAddress &addr) const |
Parenthesis operator with a single CommAddress parameter. More... | |
Hash function (functor) for CommAddress objets.
This class is defined for use with STL template classes that require a hash functor (e.g. std::unordered_map
).
Definition at line 186 of file CommAddress.h.
|
inline |
Parenthesis operator with a single CommAddress parameter.
This method returns the hash value for the object specified in the addr
parameter. If the address type is CommAddress::INET, then the hash code is computed as the bitwise exclusive OR of the IP address and the port. If the address is of type CommAddress::PROXY, then the hash code is computed with __gnu_cxx::hash<const char *>
. Otherwise the hash value is 0.
Definition at line 197 of file CommAddress.h.