InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
KeyMatchPredicate< Key, Value > Struct Template Reference

#include <KeyValuePair.h>

Public Member Functions

 KeyMatchPredicate (const Key &key)
 
bool operator() (const KeyValuePair< Key, Value > &x)
 

Public Attributes

Key fKey
 

Detailed Description

template<class Key, class Value>
struct KeyMatchPredicate< Key, Value >

Predicate object used for finding matching keys. Useful for find_if type expressions.

Constructor & Destructor Documentation

template<class Key , class Value >
KeyMatchPredicate< Key, Value >::KeyMatchPredicate(const Key & key)
inline

Construct a new KeyMatchPredicate based on a key.

Parameters
keythe key
Returns
KeyMatchPredicate object

Member Function Documentation

template<class Key , class Value >
bool KeyMatchPredicate< Key, Value >::operator() (const KeyValuePair< Key, Value > & x)
inline

Compare the supplied KeyValuePair with the key passed to the constructor.

Parameters
KeyValuePairto compare
Returns
true if the key matches the KeyValuePair