|
JS8Call-Improved master
|
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. | |
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.
| bool CountriesWorked::getHasWorked | ( | const QString | countryName | ) | const |
Query whether a country has been worked.
Check if a country has been worked.
| countryName | Name to check. |
| countryName | The name of the country to check. |
| qsizetype CountriesWorked::getSize | ( | ) | const |
Get the total number of tracked country names.
Get the total number of countries being tracked.
| qsizetype CountriesWorked::getWorkedCount | ( | ) | const |
Count how many countries have been marked as worked.
Get the count of countries that have been worked.
| void CountriesWorked::init | ( | const QStringList | countryNames | ) |
Initialize the set with a list of known country names.
| countryNames | List of country/entity names to initialize. |
| void CountriesWorked::setAsWorked | ( | const QString | countryName | ) |
Mark a country as worked.
| countryName | Name of the country to mark worked. |
| countryName | The name of the country to mark as worked. |