libdrmconf 0.14.1
A library to program DMR radios.
Loading...
Searching...
No Matches
Frequency::MapNearest< T > Class Template Reference

Searches for the nearest frequency and returns an associated value. More...

#include <frequency.hh>

Public Member Functions

 MapNearest (const QList< QPair< Frequency, T > > &items)
 Constructs a nearest frequency mapping.
const_iterator find (const Frequency &f) const
 Searches for the nearest item to the given frequency.
value (const Frequency &f) const
 Returns the value associated with the nearest item for the given frequency.
Frequency key (const Frequency &f) const
 Returns the frequency of the nearest item for the given frequency.

Protected Types

typedef QList< QPair< Frequency, T > > container
typedef container::const_iterator const_iterator

Static Protected Member Functions

static bool compItem (const QPair< Frequency, T > &a, const QPair< Frequency, T > &b)
 Comparison of items by frequency.
static bool compItemValue (const QPair< Frequency, T > &a, const Frequency &b)
 Comparison of item and frequency.

Protected Attributes

container _items
 All items.

Detailed Description

template<class T>
class Frequency::MapNearest< T >

Searches for the nearest frequency and returns an associated value.


The documentation for this class was generated from the following file:
  • /builddir/build/BUILD/qdmr-0.14.1-build/qdmr-0.14.1/lib/frequency.hh