WSJT-X/logbook/countrydat.h
Bill Somerville 8215f3412b Priorities for decoded message highlighting and new worked before internal database
Settings option to highlight not worked before entities/grids/calls by
mode. Fix issues with highlighting  decodes and generally refactor the
internal  workings  of  ADIF  and  QSO  recording  for  worked  before
detection.
2018-10-25 00:00:19 +01:00

31 lines
705 B
C++

/*
* Reads cty.dat file
* Establishes a map between prefixes and their country names
* VK3ACF July 2013
*/
#ifndef COUNTRY_DAT_H_
#define COUNTRY_DAT_H_
#include <boost/core/noncopyable.hpp>
#include <QString>
#include <QHash>
class CountryDat final
: private boost::noncopyable
{
public:
CountryDat ();
QString find (QString const& call) const; // return country name or ""
private:
QString extractName (QString const& line) const;
void removeBrackets (QString& line, QString const& a, QString const& b) const;
QStringList extractPrefix (QString& line, bool& more) const;
QString fixup (QString country, QString const& call) const;
QHash<QString, QString> data_;
};
#endif