|
libdrmconf 0.14.1
A library to program DMR radios.
|
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. | |
| T | 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. | |
Searches for the nearest frequency and returns an associated value.