CSimpleMapEqualHelper Class

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at CSimpleMapEqualHelper Class.

This class is a helper for the CSimpleMap class.

template <class TKey, class TVal>  
class CSimpleMapEqualHelper

Parameters

TKey
The key element.

TVal
The value element.

Public Methods

NameDescription
CSimpleMapEqualHelper::IsEqualKey(Static) Tests two keys for equality.
CSimpleMapEqualHelper::IsEqualValue(Static) Tests two values for equality.

This traits class is a supplement to the CSimpleMap class. It provides methods for comparing two CSimpleMap object elements (specifically, the key and value components) for equality. By default, the keys and values are compared using operator==(), but if the map contains complex data types that lack their own equality operator, this class can be overridden to provide the extra required functionality.

Header: atlsimpcoll.h

Tests two keys for equality.

static bool IsEqualKey(const TKey& k1, const TKey& k2);

Parameters

k1
The first key.

k2
The second key.

Return Value

Returns true if the keys are equal, false otherwise.

Tests two values for equality.

static bool IsEqualValue(const TVal& v1, const TVal& v2);

Parameters

v1
The first value.

v2
The second value.

Return Value

Returns true if the values are equal, false otherwise.

CSimpleMapEqualHelperFalse Class
Class Overview

Show: