| # Gaudi Framework, version v21r7 |

Home |  | Generated: 22 Jan 2010

# GaudiUtils::VectorMap< KEY, VALUE, KEYCOMPARE, ALLOCATOR >::_compare_type Struct Reference

The actual structure used to compare the elements Only "key" is important for comparison. More...

`#include <VectorMap.h>`

List of all members.

## Public Member Functions
| _compare_type (const key_compare &cmp)
| constructor from the key-comparison criteria
| _compare_type ()
| default constructor
bool | operator() (const key_type &k1, const key_type &k2) const
| compare keys: use key_compare
bool | operator() (const value_type &v1, const value_type &v2) const
| compare pairs (key,mapped): use compare by keys
bool | operator() (const key_type &k, const value_type &v) const
| compare key and pair (key,mapped): use compare by keys
bool | operator() (const value_type &v, const key_type &k) const
| compare pair (key,mapped) and the key: use compare by keys

## Detailed Description

### template<class KEY, class VALUE, class KEYCOMPARE = std::less<const KEY>, class ALLOCATOR = std::allocator<std::pair<KEY,VALUE> >>
struct GaudiUtils::VectorMap< KEY, VALUE, KEYCOMPARE, ALLOCATOR >::_compare_type

The actual structure used to compare the elements Only "key" is important for comparison.

Definition at line 101 of file VectorMap.h.

## Constructor & Destructor Documentation

template<class KEY, class VALUE, class KEYCOMPARE = std::less<const KEY>, class ALLOCATOR = std::allocator<std::pair<KEY,VALUE> >>

GaudiUtils::VectorMap< KEY, VALUE, KEYCOMPARE, ALLOCATOR >::_compare_type::_compare_type | ( | const key_compare & | cmp | ) | `[inline]`

constructor from the key-comparison criteria

Definition at line 105 of file VectorMap.h.

    00105 : key_compare ( cmp ) {} ;

template<class KEY, class VALUE, class KEYCOMPARE = std::less<const KEY>, class ALLOCATOR = std::allocator<std::pair<KEY,VALUE> >>

GaudiUtils::VectorMap< KEY, VALUE, KEYCOMPARE, ALLOCATOR >::_compare_type::_compare_type | ( |  | ) | `[inline]`

default constructor

Definition at line 107 of file VectorMap.h.

    00107 : key_compare (     ) {} ;

## Member Function Documentation

template<class KEY, class VALUE, class KEYCOMPARE = std::less<const KEY>, class ALLOCATOR = std::allocator<std::pair<KEY,VALUE> >>

bool GaudiUtils::VectorMap< KEY, VALUE, KEYCOMPARE, ALLOCATOR >::_compare_type::operator() | ( | const key_type & | k1,
|  | const key_type & | k2 |
| ) |  |  | const`[inline]`

compare keys: use key_compare

Definition at line 109 of file VectorMap.h.

    00110       { return this->key_compare::operator() ( k1 , k2 ) ; }

template<class KEY, class VALUE, class KEYCOMPARE = std::less<const KEY>, class ALLOCATOR = std::allocator<std::pair<KEY,VALUE> >>

bool GaudiUtils::VectorMap< KEY, VALUE, KEYCOMPARE, ALLOCATOR >::_compare_type::operator() | ( | const value_type & | v1,
|  | const value_type & | v2 |
| ) |  |  | const`[inline]`

compare pairs (key,mapped): use compare by keys

Definition at line 112 of file VectorMap.h.

    00113       { return operator() ( v1.first, v2.first ); }

template<class KEY, class VALUE, class KEYCOMPARE = std::less<const KEY>, class ALLOCATOR = std::allocator<std::pair<KEY,VALUE> >>

bool GaudiUtils::VectorMap< KEY, VALUE, KEYCOMPARE, ALLOCATOR >::_compare_type::operator() | ( | const key_type & | k,
|  | const value_type & | v |
| ) |  |  | const`[inline]`

compare key and pair (key,mapped): use compare by keys

Definition at line 115 of file VectorMap.h.

    00116       { return operator() ( k , v.first ) ; }

template<class KEY, class VALUE, class KEYCOMPARE = std::less<const KEY>, class ALLOCATOR = std::allocator<std::pair<KEY,VALUE> >>

bool GaudiUtils::VectorMap< KEY, VALUE, KEYCOMPARE, ALLOCATOR >::_compare_type::operator() | ( | const value_type & | v,
|  | const key_type & | k |
| ) |  |  | const`[inline]`

compare pair (key,mapped) and the key: use compare by keys

Definition at line 118 of file VectorMap.h.

    00119       { return operator() ( v.first , k ) ; }

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

- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v21r7/GaudiKernel/GaudiKernel/VectorMap.h