Definition at line 129 of file countryinfo.h.
typedef std::map<std::string, CountryInfo*> OSB_LIB::CountryInfoList::E164CountryInfoMap |
typedef std::map<CountryInfo::Oid, CountryInfo*> OSB_LIB::CountryInfoList::OidCountryInfoMap |
Map between the object identifier and the country info.
Definition at line 136 of file countryinfo.h.
OSB_LIB::CountryInfoList::~CountryInfoList | ( | ) |
Destructor to destruct the singleton object.
OSB_LIB::CountryInfoList::CountryInfoList | ( | ) | [inline, private] |
std::string OSB_LIB::CountryInfoList::countryCode | ( | const NwAddress & | nwAddress | ) |
Get the ISO 3166 3-letter country code for a network address.
nwAddress | Network address for which the determine the country code. |
bool OSB_LIB::CountryInfoList::getCountryInfo | ( | const std::string & | dialledNum, | |
CountryInfo & | countryInfo | |||
) | const |
Get the country info object from the given string.
Only the first 5 characters of the passed in `e164cc' will be used to match the entries configured.
dialledNum | The number dialled. | |
countryInfo | The country info object as an output argument to get the country info for the given numeric code. |
const CountryInfo& OSB_LIB::CountryInfoList::getCountryInfo | ( | const CountryInfo::Oid & | oid | ) |
Get the country info object for the given object identifier.
It gets the country info from the map by providing the object identifier. If there is no object for the given object id it will throw an osb exception.
oid | Unique object identifier of the country info. |
Exception | for the following.
|
const CountryInfos& OSB_LIB::CountryInfoList::getCountryInfos | ( | ) | const |
Returns the country info list.
static CountryInfoList& OSB_LIB::CountryInfoList::instance | ( | ) | [static] |
This will return the same instance of CountryInfoList to everyone.
long OSB_LIB::CountryInfoList::read | ( | const OSB_DB::Session & | session | ) |
Read all the country info and map it to the corresponding number code and oid.
It reads all the country info from the database and map the country info with the E.164 number and map the same country info with the country info object id.
session | Database session to use. |
Exception | on general database error. |
CountryInfoList* OSB_LIB::CountryInfoList::ciList_ [static, private] |
Map between the numeric code and the country info reference. This is to identify the country info for the given E.164 number.
Definition at line 237 of file countryinfo.h.
Map between the object identifier and the country info reference. This is to identify the country info for the given object identifier.
Definition at line 244 of file countryinfo.h.