LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
SorterByKey< Key, ExtractKey, Comparer > Struct Template Reference

Public Types

using Key_t = Key
 

Public Member Functions

template<typename A , typename B >
bool operator() (A const &a, B const &b) const
 

Static Public Member Functions

static bool sortKey (Key_t a, Key_t b)
 
static Key_t key (Key_t k)
 
template<typename Data >
static Key_t key (Data const &obj)
 

Detailed Description

template<typename Key, typename ExtractKey, typename Comparer = std::less<Key>>
struct SorterByKey< Key, ExtractKey, Comparer >

Definition at line 466 of file DriftPartitions.cxx.

Member Typedef Documentation

template<typename Key , typename ExtractKey , typename Comparer = std::less<Key>>
using SorterByKey< Key, ExtractKey, Comparer >::Key_t = Key

Definition at line 470 of file DriftPartitions.cxx.

Member Function Documentation

template<typename Key , typename ExtractKey , typename Comparer = std::less<Key>>
static Key_t SorterByKey< Key, ExtractKey, Comparer >::key ( Key_t  k)
inlinestatic

Definition at line 473 of file DriftPartitions.cxx.

473 { return k; }
template<typename Key , typename ExtractKey , typename Comparer = std::less<Key>>
template<typename Data >
static Key_t SorterByKey< Key, ExtractKey, Comparer >::key ( Data const &  obj)
inlinestatic

Definition at line 475 of file DriftPartitions.cxx.

475 { return ExtractKey()(obj); }
template<typename Key , typename ExtractKey , typename Comparer = std::less<Key>>
template<typename A , typename B >
bool SorterByKey< Key, ExtractKey, Comparer >::operator() ( A const &  a,
B const &  b 
) const
inline

Definition at line 478 of file DriftPartitions.cxx.

479  { return sortKey(key(a), key(b)); }
static bool sortKey(Key_t a, Key_t b)
static Key_t key(Key_t k)
template<typename Key , typename ExtractKey , typename Comparer = std::less<Key>>
static bool SorterByKey< Key, ExtractKey, Comparer >::sortKey ( Key_t  a,
Key_t  b 
)
inlinestatic

Definition at line 472 of file DriftPartitions.cxx.

472 { return Comparer()(a, b); }

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