Definition at line 111 of file e164map.h.
typedef std::map<char, Leaf> OSB_LIB::E164Map::Leaves [private] |
typedef std::map<NwAddress::Ton, Leaves> OSB_LIB::E164Map::Tons [private] |
OSB_LIB::E164Map::E164Map | ( | ) |
Default constructor.
The default constructor sets the flag `needBuild_' to true.
void OSB_LIB::E164Map::add | ( | const E164 & | e164, | |
const ConnectionPt & | cp | |||
) | [private] |
Add an E.164 number.
void OSB_LIB::E164Map::build | ( | const TariffCatalogue & | tcat | ) |
Build the map.
The function loops over all E164 as contained in TariffCatalogue.e164s. Every E164 that has a connection point assigned and whose value is not empty is added to the internal structure.
tcat | Reference to the tariff catalogue. |
OsbException |
|
Id<ConnectionPt> OSB_LIB::E164Map::map2Cp | ( | NwAddress::Ton | ton, | |
const std::string & | e164, | |||
const DateTime & | ts | |||
) | const |
Determine the connection point.
The function determines the most matching configured E164 number for which, at time `ts', a connection point is assigned:
Most matching means that, starting from left, the configured entry has the most number of equal digits with `e164'.
Example:
For the number `234567'
If configured and released at time `ts', the catchall entry (E164::catchall) will match any string (including an empty string).
void OSB_LIB::E164Map::print | ( | std::ostream & | os | ) | const |
Printing for testing purposes.
friend class TariffCatalogue [friend] |
std::map<NwAddress::Ton, MappedCp> OSB_LIB::E164Map::catchalls_ [private] |
bool OSB_LIB::E164Map::needBuild_ [private] |
Flag if the map need to be build.
This flag is set to true in the default constructor and cleared on successful completion of build.
The tariff catalogue sets this flag whenever an E164 configuration changes. Before giving read-only access to the map, the tariff catalogue checks the flag and ev. rebuilds the map.
Tons OSB_LIB::E164Map::tons_ [private] |