Skip to content

Latest commit

 

History

History
66 lines (42 loc) · 1.56 KB

cdefaulthashtraits-class.md

File metadata and controls

66 lines (42 loc) · 1.56 KB
description title ms.date f1_keywords helpviewer_keywords ms.assetid
Learn more about: CDefaultHashTraits Class
CDefaultHashTraits Class
11/04/2016
CDefaultHashTraits
ATLCOLL/ATL::CDefaultHashTraits
ATLCOLL/ATL::CDefaultHashTraits::Hash
CDefaultHashTraits class
d8ec4b37-6d58-447b-a0c1-8580c5b1ab85

CDefaultHashTraits Class

This class provides a static function for calculating hash values.

Syntax

template<typename T>
class CDefaultHashTraits

Parameters

T
The type of data to be stored in the collection.

Members

Public Methods

Name Description
CDefaultHashTraits::Hash (Static) Call this function to calculate a hash value for a given element.

Remarks

This class contains a single static function that returns a hash value for a given element. This class is utilized by the CDefaultElementTraits Class.

For more information, see ATL Collection Classes.

Requirements

Header: atlcoll.h

CDefaultHashTraits::Hash

Call this function to calculate a hash value for a given element.

static ULONG Hash(const T& element) throw();

Parameters

element
The element.

Return Value

Returns the hash value.

Remarks

The default hashing algorithm is very simple: the return value is the element number. Override this function if a more complicated algorithm is required.

See also

Class Overview