OSB_LIB::MappingDistTcs Class Reference

Inheritance diagram for OSB_LIB::MappingDistTcs:

Inheritance graph
[legend]
Collaboration diagram for OSB_LIB::MappingDistTcs:

Collaboration graph
[legend]
List of all members.

Detailed Description

Map call attributes to connection points and determine tariff class.

Definition at line 740 of file tcdist.h.

Public Types

Public Member Functions

Configuration:
Class specific checks for status changes:
Class specific database operations:

Private Member Functions

Private Attributes

Static Private Attributes

Friends


Member Typedef Documentation

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.

Definition at line 754 of file tcdist.h.

typedef std::vector<UsageMapping> OSB_LIB::MappingDistTcs::MappingList

List with usage record mapping definitions.

Definition at line 756 of file tcdist.h.

typedef TypeId<Cdr, 1> OSB_LIB::MappingDistTcs::UsageType

Readable name for CDR usage type.

Definition at line 752 of file tcdist.h.


Constructor & Destructor Documentation

OSB_LIB::MappingDistTcs::MappingDistTcs ( const TcSystem::Oid tcsId  )  [explicit]

Constructor with tariff system id.


Member Function Documentation

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.

Parameters:
mapping Mapping definition to add or change.
Returns:
true if the mapping was added or an existing mapping was replaced, else false.

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:

Remarks:
(ToDo) TcsVersion ensures that the object exists in the database and that is up-to-date.
Parameters:
session Database session to use.
errors Container for detected errors.
Returns:
true if the status of the TCS version can be changed from editable to standby.

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:

Parameters:
session Database session to use.
errors Container for detected errors.
Returns:
true if the status of the TCS version can be changed from standby to released.

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.

Parameters:
session Database session to use: not used.
errors Container for detected errors: not used.
Returns:
Always true.

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.

Parameters:
session Database session to use: not used.
errors Container for detected errors: not used.
Returns:
Always true.

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.

Parameters:
src TCS version from which to copy the configuration.
Exceptions:
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.

Parameters:
session Database session to use.
Exceptions:
OsbException as specified by the gateway class.
Returns:
true in case of success, else false.

Implements OSB_LIB::TcsVersion.

const TcSystem::Oid& OSB_LIB::MappingDistTcs::distTcs (  )  const [inline]

Get the id of the distance TCS.

Definition at line 822 of file tcdist.h.

References distTcs_.

const UsageMapping* OSB_LIB::MappingDistTcs::findMapping ( const UsageType ut  )  const

Find a mapping for a usage type.

Parameters:
ut Usage type to search for.
Returns:
A pointer to the mapping definition for the usage type, 0 if not found.

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:

Parameters:
cdr Call record to classify.
service Not used and ignored.
Returns:
The tariff class for the classified CDR and service. The id is not set, if the tariff class can not be determined, e.g, in case of an unsupported usage type.

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.

Parameters:
session Database session to use.
Exceptions:
OsbException as specified by the gateway class.
Returns:
true in case of success, else false.

Implements OSB_LIB::TcsVersion.

MappingList::iterator OSB_LIB::MappingDistTcs::mappingDef ( const UsageType ut  )  [private]

Find a mapping for a usage type.

Parameters:
ut Usage type to search for.
Returns:
A iterator to the mapping definition for the usage type, it will be mappings_.end() if not found.

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.

Parameters:
session Database session to use.
Exceptions:
OsbException as specified by the gateway class.
Returns:
true in case of success, else false.

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.

Parameters:
ut Usage type to remove.
Returns:
true if the mapping was removed, false if the no mapping for the usage type existed or the status of the TCS version is not editable.

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.

Returns:
true if the new distance TCS was set, else false.

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.

Parameters:
tcOids Container for the object id of all tariff classes supported.

TcSystem::TcsType OSB_LIB::MappingDistTcs::type (  )  const [virtual]

Type of the class: tcsMapping.

Implements OSB_LIB::TcsVersion.

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.

Parameters:
session Database session to use.
Exceptions:
OsbException as specified by the gateway class.
Returns:
true in case of success, else false.

Implements OSB_LIB::TcsVersion.

const MappingList& OSB_LIB::MappingDistTcs::usageTypeMapping (  )  const

Read access to all usage type mappings.


Friends And Related Function Documentation

friend class OSB_DB::MappingDistTcsGw [friend]

For database I/O operations the gateway needs direct access to private data members.

Definition at line 749 of file tcdist.h.


Member Data Documentation

TcSystem::Oid OSB_LIB::MappingDistTcs::distTcs_ [private]

Id of the DistTcs used to determine the tariff class.

Definition at line 1024 of file tcdist.h.

Referenced by distTcs().

MappingList OSB_LIB::MappingDistTcs::mappings_ [private]

List that defines the mapping for each usage type.

Definition at line 1028 of file tcdist.h.

const TcSystem::TcsType OSB_LIB::MappingDistTcs::type_ = TcSystem::tcsMapping [static, private]

The of the tariff classification system.

Definition at line 743 of file tcdist.h.


The documentation for this class was generated from the following file:
Generated on Sat Sep 2 14:17:11 2006 for OSB Library by  doxygen 1.4.7