__gnu_cxx::hash< IPvXAddress > Struct Template Reference

defines a hash function for IPvXAddress More...

#include <HashFunc.h>

List of all members.

Public Member Functions

std::size_t operator() (const IPvXAddress &addr) const
 hash function for IPvXaddress

Detailed Description

template<>
struct __gnu_cxx::hash< IPvXAddress >

defines a hash function for IPvXAddress

Definition at line 42 of file HashFunc.h.


Member Function Documentation

std::size_t __gnu_cxx::hash< IPvXAddress >::operator() ( const IPvXAddress &  addr  )  const [inline]

hash function for IPvXaddress

Parameters:
addr the IPvXAddress to hash
Returns:
the hashed IPvXAddress

Definition at line 50 of file HashFunc.h.

00051     {
00052         if (addr.isIPv6()) {
00053             return bswap_32(addr.get6().words()[0]) ^
00054                    bswap_32(addr.get6().words()[1]) ^
00055                    bswap_32(addr.get6().words()[2]) ^
00056                    bswap_32(addr.get6().words()[3]);
00057         } else {
00058             return bswap_32(addr.get4().getInt());
00059         }
00060     }


The documentation for this struct was generated from the following file:
Generated on Wed May 26 16:21:19 2010 for OverSim by  doxygen 1.6.3