0.9.8.10
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | List of all members
Hypertable::CommAddressHash Class Reference

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...
 

Detailed Description

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.

Member Function Documentation

size_t Hypertable::CommAddressHash::operator() ( const CommAddress addr) const
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.

Returns
hash value

Definition at line 197 of file CommAddress.h.


The documentation for this class was generated from the following file: