Compartilhar via


CStringRefElementTraits Class

This class provides static functions related to strings stored in collection class objects. The string objects are dealt with as references.

template< 
   typename T 
> 
class CStringRefElementTraits : public CElementTraitsBase< T >

Parameters

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

Members

Public Methods

Name

Description

CStringRefElementTraits::CompareElements

Call this static function to compare two string elements for equality.

CStringRefElementTraits::CompareElementsOrdered

Call this static function to compare two string elements.

CStringRefElementTraits::Hash

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

Remarks

This class provides static functions for comparing strings and for creating a hash value. These functions are useful when using a collection class to store string-based data. Unlike CStringElementTraits and CStringElementTraitsI, CStringRefElementTraits causes the CString arguments to be passed as const CString& references.

For more information, see ATL Collection Classes.

Inheritance Hierarchy

CElementTraitsBase

CStringRefElementTraits

Requirements

Header: atlcoll.h

See Also

Reference

CElementTraitsBase Class

Other Resources

ATL Class Overview