Definition at line 740 of file tcdist.h.
typedef std::auto_ptr<MappingDistTcs> OSB_LIB::MappingDistTcs::AutoPtr |
Short-cut for an auto pointer.
For details see quality manual, implementation patterns: Virtual copy construction.
Reimplemented from OSB_LIB::TcsVersion.
typedef std::vector<UsageMapping> OSB_LIB::MappingDistTcs::MappingList |
typedef TypeId<Cdr, 1> OSB_LIB::MappingDistTcs::UsageType |
OSB_LIB::MappingDistTcs::MappingDistTcs | ( | const TcSystem::Oid & | tcsId | ) | [explicit] |
Constructor with tariff system id.
bool OSB_LIB::MappingDistTcs::addMapping | ( | const UsageMapping & | mapping | ) |
Add or change a usage type mapping.
Adds or replaces the mapping for a usage type. In order to succeed the status of the TCS version must be editable and the usage type must be valid.
mapping | Mapping definition to add or change. |
bool OSB_LIB::MappingDistTcs::canFreeze | ( | const OSB_DB::Session & | session, | |
OsbErrors & | errors | |||
) | const [virtual] |
Check if a mapping TCS version can be freezed.
Checks the consistency of a mapping TCS. The following conditions must be fulfilled in order for the check to succeed:
session | Database session to use. | |
errors | Container for detected errors. |
Implements OSB_LIB::TcsVersion.
bool OSB_LIB::MappingDistTcs::canRelease | ( | const OSB_DB::Session & | session, | |
OsbErrors & | errors | |||
) | const [virtual] |
Check if a mapping TCS version can be released.
The following conditions must be fulfilled for a successful check:
session | Database session to use. | |
errors | Container for detected errors. |
Implements OSB_LIB::TcsVersion.
bool OSB_LIB::MappingDistTcs::canRevoke | ( | const OSB_DB::Session & | session, | |
OsbErrors & | errors | |||
) | const [virtual] |
Check if a mapping TCS version can be revoked.
All conditions to be fulfilled before a mapping TCS version can be revoked are tested by the base class in TcsVersion::revoke(): this function just returns true.
session | Database session to use: not used. | |
errors | Container for detected errors: not used. |
Implements OSB_LIB::TcsVersion.
bool OSB_LIB::MappingDistTcs::canUnfreeze | ( | const OSB_DB::Session & | session, | |
OsbErrors & | errors | |||
) | const [virtual] |
Check if a mapping TCS version can be unfreezed.
All conditions to be fulfilled before a mapping TCS version can be unfreezed are tested by the base class in TcsVersion::unfreeze(): this function just returns true.
session | Database session to use: not used. | |
errors | Container for detected errors: not used. |
Implements OSB_LIB::TcsVersion.
void OSB_LIB::MappingDistTcs::clearMappings | ( | ) |
Clear all entries in usage type mapping.
AutoPtr OSB_LIB::MappingDistTcs::clone | ( | ) | const |
Virtual copy construction.
For details see quality manual, implementation patterns.
Reimplemented from OSB_LIB::TcsVersion.
virtual TcsVersion* OSB_LIB::MappingDistTcs::clone_ | ( | ) | const [private, virtual] |
Virtual copy construction.
For details see quality manual, implementation patterns.
Implements OSB_LIB::TcsVersion.
void OSB_LIB::MappingDistTcs::copyCfg | ( | const OSB_LIB::TcsVersion * | src | ) | [virtual] |
Get configuration from another TCS version.
src | TCS version from which to copy the configuration. |
OsbException | if src has a different TCS type. |
Implements OSB_LIB::TcsVersion.
virtual bool OSB_LIB::MappingDistTcs::delSpecific | ( | const OSB_DB::Session & | session | ) | [virtual] |
Delete class specific data from database.
The function uses OSB_DB::MappingDistTcsGw::delSpecific to delete its type specific data from the database.
session | Database session to use. |
OsbException | as specified by the gateway class. |
Implements OSB_LIB::TcsVersion.
const TcSystem::Oid& OSB_LIB::MappingDistTcs::distTcs | ( | ) | const [inline] |
const UsageMapping* OSB_LIB::MappingDistTcs::findMapping | ( | const UsageType & | ut | ) | const |
Find a mapping for a usage type.
ut | Usage type to search for. |
TariffClass::Oid OSB_LIB::MappingDistTcs::getTc | ( | Cdr & | cdr, | |
UsedService & | service | |||
) | const [virtual] |
Determine the tariff class for a CDR and used service.
The function determines the mapped origin and destination of the service and then calls the assigned distance TCS to determine the tariff class.
The following error conditions may occur:
cdr | Call record to classify. | |
service | Not used and ignored. |
Implements OSB_LIB::TcsVersion.
virtual bool OSB_LIB::MappingDistTcs::insSpecific | ( | const OSB_DB::Session & | session | ) | [virtual] |
Insert class specific data into database.
The function uses OSB_DB::MappingDistTcsGw::insSpecific to insert its type specific data to the database.
session | Database session to use. |
OsbException | as specified by the gateway class. |
Implements OSB_LIB::TcsVersion.
MappingList::iterator OSB_LIB::MappingDistTcs::mappingDef | ( | const UsageType & | ut | ) | [private] |
Find a mapping for a usage type.
ut | Usage type to search for. |
virtual bool OSB_LIB::MappingDistTcs::readSpecific | ( | const OSB_DB::Session & | session | ) | [virtual] |
Read class specific data from database.
The function uses OSB_DB::MappingDistTcsGw::readSpecific to read its type specific data from the database.
session | Database session to use. |
OsbException | as specified by the gateway class. |
Implements OSB_LIB::TcsVersion.
bool OSB_LIB::MappingDistTcs::rmMapping | ( | const UsageType & | ut | ) |
Remove a usage type mapping.
Removes the mapping for a usage type from the configuration.
ut | Usage type to remove. |
bool OSB_LIB::MappingDistTcs::setDistTcs | ( | const TcSystem::Oid & | distTcs | ) |
Set the id of the distance TCS.
Sets the id of the DistTcs used by the mapping TCS to determine the tariff class once the mapped origin and destination for a CDR are determined.
In order to succeed, the status of the object must be cfgEditable. The function does not verify, that the TCS as identified by distTcs() has the correct type. This check is performed only in canFreeze, i.e. before changing the status to cfgStandby.
void OSB_LIB::MappingDistTcs::supportedTc | ( | std::set< TariffClass::Oid > & | tcOids | ) | const |
Return all tariff classes supported.
This function will retrieve all tariff classes supported by this tariff classification system version. All retrieved tariff classes are place in the std::set container passed in.
tcOids | Container for the object id of all tariff classes supported. |
TcSystem::TcsType OSB_LIB::MappingDistTcs::type | ( | ) | const [virtual] |
virtual bool OSB_LIB::MappingDistTcs::updSpecific | ( | const OSB_DB::Session & | session | ) | [virtual] |
Update class specific data in the database.
The function uses OSB_DB::MappingDistTcsGw::updSpecific to update its type specific data in the database.
session | Database session to use. |
OsbException | as specified by the gateway class. |
Implements OSB_LIB::TcsVersion.
const MappingList& OSB_LIB::MappingDistTcs::usageTypeMapping | ( | ) | const |
Read access to all usage type mappings.
friend class OSB_DB::MappingDistTcsGw [friend] |
const TcSystem::TcsType OSB_LIB::MappingDistTcs::type_ = TcSystem::tcsMapping [static, private] |