![]() |
VR-Forces 5.0.1 Developer's Guide
|
This class will read a country codes file (default settings\country-codes.csv) and allow for access of that information here.

Public Types | |
| typedef std::map< std::string, std::string > | CountryCodes |
Public Member Functions | |
| DtCountryCodesManager (makVrv::DtDe &) | |
| DtCountryCodesManager (const DtCountryCodesManager &) | |
| virtual | ~DtCountryCodesManager () |
| virtual const std::set < std::string > & | countryCodes () const |
| virtual const CountryCodes & | countryCodesByCountry () const |
| virtual const CountryCodes & | countriesByCountryCode () const |
| virtual void | addCountry (const std::string &code, const std::string &name, bool signal=true) |
| virtual std::string | country (const std::string &code) const |
| virtual std::string | countryCode (const std::string &country) const |
| virtual bool | loadCountryCodesFile (const std::string &, bool merge=false) |
| virtual bool | reload () |
| virtual bool | removeCountry (const std::string &, bool signal=true) |
Public Member Functions inherited from makVrv::DtVirtualBaseClass | |
| DtVirtualBaseClass () | |
| virtual | ~DtVirtualBaseClass () |
Static Public Member Functions | |
| static DtCountryCodesManager & | instance (makVrv::DtDe &de) |
| static void | registerInstance (makVrv::DtDe &, DtCountryCodesManager *) |
Public Attributes | |
| boost::signals2::signal< void(std::string, std::string)> | signal_countryAdded |
| boost::signals2::signal< void(std::string)> | signal_countryRemoved |
| boost::signals2::signal< void()> | signal_loaded |
Protected Attributes | |
| makVrv::DtDe & | myDe |
| std::set< std::string > | myCountryCodes |
| CountryCodes | myCountriesByCountryCode |
| CountryCodes | myCountryCodesByCountry |
| DtFilename | myLastLoadedFile |
| typedef std::map<std::string, std::string> makVrf::DtCountryCodesManager::CountryCodes |
Map is 2 letter country code followed by engish name.
| makVrf::DtCountryCodesManager::DtCountryCodesManager | ( | makVrv::DtDe & | ) |
| makVrf::DtCountryCodesManager::DtCountryCodesManager | ( | const DtCountryCodesManager & | ) |
|
virtual |
|
static |
Returns instance of the messager.
|
static |
|
inlinevirtual |
Returns the current list of country codes.
|
inlinevirtual |
Returns the current list of countries mapped to country codes.
|
inlinevirtual |
Returns the current list of country codes mapped to country.
|
virtual |
Adds a new country code and country.
|
virtual |
Returns the country name for the country code.
Reimplemented in makVrf::DtQtCountryCodesManager.
|
virtual |
Returns the country code for the country name (english)
|
virtual |
Loads the country code file. Will merge if the optional flag is true, else will replace all.
|
virtual |
Clears out and reloads based on last loaded file.
|
virtual |
Removes a country by code.
| boost::signals2::signal<void (std::string, std::string)> makVrf::DtCountryCodesManager::signal_countryAdded |
Signals Signal when country added (code, name)
| boost::signals2::signal<void (std::string)> makVrf::DtCountryCodesManager::signal_countryRemoved |
Signal sent when country removed.
| boost::signals2::signal<void ()> makVrf::DtCountryCodesManager::signal_loaded |
Signal when loaded.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Reverse map (for convenience)