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

Simple boolean set indicating which country names have been worked. More...

#include <CountriesWorked.h>

Public Member Functions

void init (const QStringList countryNames)
 Initialize the set with a list of known country names.
void setAsWorked (const QString countryName)
 Mark a country as worked.
bool getHasWorked (const QString countryName) const
 Query whether a country has been worked.
qsizetype getWorkedCount () const
 Count how many countries have been marked as worked.
qsizetype getSize () const
 Get the total number of tracked country names.

Detailed Description

Simple boolean set indicating which country names have been worked.

The class stores a mapping from country name to a boolean flag which is toggled when a country is marked as worked. It supports initialization from a list of country names and exposes simple accessors for querying and counting worked entities.

Member Function Documentation

◆ getHasWorked()

bool CountriesWorked::getHasWorked ( const QString countryName) const

Query whether a country has been worked.

Check if a country has been worked.

Parameters
countryNameName to check.
Returns
true if worked, false otherwise.
Parameters
countryNameThe name of the country to check.
Returns
True if the country has been worked, false otherwise.

◆ getSize()

qsizetype CountriesWorked::getSize ( ) const

Get the total number of tracked country names.

Get the total number of countries being tracked.

Returns
The total number of countries.

◆ getWorkedCount()

qsizetype CountriesWorked::getWorkedCount ( ) const

Count how many countries have been marked as worked.

Get the count of countries that have been worked.

Returns
The number of worked countries.

◆ init()

void CountriesWorked::init ( const QStringList countryNames)

Initialize the set with a list of known country names.

Parameters
countryNamesList of country/entity names to initialize.

◆ setAsWorked()

void CountriesWorked::setAsWorked ( const QString countryName)

Mark a country as worked.

Parameters
countryNameName of the country to mark worked.
countryNameThe name of the country to mark as worked.

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