JS8Call-Improved master
Loading...
Searching...
No Matches
CountryDat Class Reference

Reader and lookup helper for CTY prefix files. More...

#include <CountryDat.h>

Public Member Functions

void init (const QString filename)
 Set the filename of the CTY/cty.dat file to parse.
void load ()
 Parse the configured file and populate the internal mapping.
QString find (QString prefix) const
 Find the country/entity name for a callsign prefix.
QStringList getCountryNames () const
 Get a list of country/entity names discovered in the file.

Detailed Description

Reader and lookup helper for CTY prefix files.

Typical usage: call init(filename) then load() to populate the internal prefix->country mapping. Use find() to resolve a prefix to the country name and getCountryNames() to obtain the set of known entities.

Member Function Documentation

◆ find()

QString CountryDat::find ( QString call) const

Find the country/entity name for a callsign prefix.

Find the country name associated with a given callsign prefix.

Parameters
prefixCallsign prefix to resolve.
Returns
Country/entity name or an empty string when unknown.
Parameters
callThe callsign prefix to search for.
Returns
The corresponding country name, or an empty string if not found.

◆ getCountryNames()

QStringList CountryDat::getCountryNames ( ) const
inline

Get a list of country/entity names discovered in the file.

Returns
List of country names.

◆ init()

void CountryDat::init ( const QString filename)

Set the filename of the CTY/cty.dat file to parse.

Initialize the CountryDat instance with the specified filename.

Parameters
filenamePath to the CTY data file.
filenameThe path to the country data file.

◆ load()

void CountryDat::load ( )

Parse the configured file and populate the internal mapping.

Load country data from the specified file.


The documentation for this class was generated from the following files: