LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
geo::details::Comparer< T, Key, KeyExtractor, KeyComparer > Struct Template Reference

Class managing comparisons between T objects via a Key key. More...

#include "DriftPartitions.h"

Public Types

using Key_t = Key
 Type of comparison key. More...
 
using Object_t = T
 Type of object to be compared. More...
 

Public Member Functions

bool operator() (Key_t a, Key_t b) const
 
bool operator() (Object_t const &a, Key_t b) const
 
bool operator() (Key_t a, Object_t const &b) const
 
bool operator() (Object_t const &a, Object_t const &b) const
 

Static Private Member Functions

static auto key (T const &v)
 
static auto key_comp (Key_t a, Key_t b)
 

Detailed Description

template<typename T, typename Key, Key KeyExtractor, bool KeyComparer>
struct geo::details::Comparer< T, Key, KeyExtractor, KeyComparer >

Class managing comparisons between T objects via a Key key.

Definition at line 71 of file DriftPartitions.h.

Member Typedef Documentation

template<typename T , typename Key , Key KeyExtractor, bool KeyComparer>
using geo::details::Comparer< T, Key, KeyExtractor, KeyComparer >::Key_t = Key

Type of comparison key.

Definition at line 223 of file DriftPartitions.h.

template<typename T , typename Key , Key KeyExtractor, bool KeyComparer>
using geo::details::Comparer< T, Key, KeyExtractor, KeyComparer >::Object_t = T

Type of object to be compared.

Definition at line 224 of file DriftPartitions.h.

Member Function Documentation

template<typename T , typename Key , Key KeyExtractor, bool KeyComparer>
static auto geo::details::Comparer< T, Key, KeyExtractor, KeyComparer >::key ( T const &  v)
inlinestaticprivate

Definition at line 235 of file DriftPartitions.h.

235 { return KeyExtractor(v); }
template<typename T , typename Key , Key KeyExtractor, bool KeyComparer>
static auto geo::details::Comparer< T, Key, KeyExtractor, KeyComparer >::key_comp ( Key_t  a,
Key_t  b 
)
inlinestaticprivate

Definition at line 236 of file DriftPartitions.h.

236 { return KeyComparer(a, b); }
template<typename T , typename Key , Key KeyExtractor, bool KeyComparer>
bool geo::details::Comparer< T, Key, KeyExtractor, KeyComparer >::operator() ( Key_t  a,
Key_t  b 
) const
inline

Definition at line 226 of file DriftPartitions.h.

226 { return key_comp(a, b); }
static auto key_comp(Key_t a, Key_t b)
template<typename T , typename Key , Key KeyExtractor, bool KeyComparer>
bool geo::details::Comparer< T, Key, KeyExtractor, KeyComparer >::operator() ( Object_t const &  a,
Key_t  b 
) const
inline
template<typename T , typename Key , Key KeyExtractor, bool KeyComparer>
bool geo::details::Comparer< T, Key, KeyExtractor, KeyComparer >::operator() ( Key_t  a,
Object_t const &  b 
) const
inline
template<typename T , typename Key , Key KeyExtractor, bool KeyComparer>
bool geo::details::Comparer< T, Key, KeyExtractor, KeyComparer >::operator() ( Object_t const &  a,
Object_t const &  b 
) const
inline

Definition at line 229 of file DriftPartitions.h.

230  {
231  return this->operator()(key(a), b);
232  }
static auto key(T const &v)
bool operator()(Key_t a, Key_t b) const

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