PPL Logo

CkHashtableAdaptorT< T > Class Template Reference

A useful adaptor class for using basic (memory only) types like int, short, char, etc. More...

#include <ckhashtable.h>

Collaboration diagram for CkHashtableAdaptorT< T >:

Collaboration graph
[legend]

Public Member Functions

 CkHashtableAdaptorT (const T &v)
 CkHashtableAdaptorT ()
 added to allow pup to do Key k while unPacking
 operator T & ()
 operator const T & () const
CkHashCode hash (void) const
int compare (const CkHashtableAdaptorT< T > &t) const
void pup (PUP::er &p)

Static Public Member Functions

static CkHashCode staticHash (const void *k, size_t)
static int staticCompare (const void *a, const void *b, size_t)

Private Attributes

val

Detailed Description

template<class T>
class CkHashtableAdaptorT< T >

A useful adaptor class for using basic (memory only) types like int, short, char, etc.

as hashtable keys.

This class adds the hash, compare, staticHash, and staticCompare routines needed to be a CkHashtableT KEY; you can thus use ints as a fast key like this: CkHashtableT<CkHashtableAdaptorT<int>, foo> bar;

Definition at line 454 of file ckhashtable.h.


Constructor & Destructor Documentation

template<class T>
CkHashtableAdaptorT< T >::CkHashtableAdaptorT ( const T &  v  )  [inline]

template<class T>
CkHashtableAdaptorT< T >::CkHashtableAdaptorT (  )  [inline]

added to allow pup to do Key k while unPacking


Member Function Documentation

template<class T>
CkHashtableAdaptorT< T >::operator T & (  )  [inline]

Definition at line 460 of file ckhashtable.h.

References CkHashtableAdaptorT< T >::val.

template<class T>
CkHashtableAdaptorT< T >::operator const T & (  )  const [inline]

Definition at line 461 of file ckhashtable.h.

References CkHashtableAdaptorT< T >::val.

template<class T>
CkHashCode CkHashtableAdaptorT< T >::hash ( void   )  const [inline]

Definition at line 462 of file ckhashtable.h.

References CkHashtableAdaptorT< T >::val.

template<class T>
static CkHashCode CkHashtableAdaptorT< T >::staticHash ( const void *  k,
size_t   
) [inline, static]

Definition at line 464 of file ckhashtable.h.

template<class T>
int CkHashtableAdaptorT< T >::compare ( const CkHashtableAdaptorT< T > &  t  )  const [inline]

Definition at line 466 of file ckhashtable.h.

References CkHashtableAdaptorT< T >::val.

Referenced by CkHashtableAdaptorT< T >::staticCompare().

Here is the caller graph for this function:

template<class T>
static int CkHashtableAdaptorT< T >::staticCompare ( const void *  a,
const void *  b,
size_t   
) [inline, static]

Definition at line 468 of file ckhashtable.h.

References CkHashtableAdaptorT< T >::compare().

Here is the call graph for this function:

template<class T>
void CkHashtableAdaptorT< T >::pup ( PUP::er p  )  [inline]

Definition at line 473 of file ckhashtable.h.

References CkHashtableAdaptorT< T >::val.


Field Documentation

template<class T>
T CkHashtableAdaptorT< T >::val [private]


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

Generated on Mon Sep 21 08:20:03 2020 for Charm++ by  doxygen 1.5.5