Definition at line 353 of file tariffclass.h.
typedef std::auto_ptr<TcsVersion> OSB_LIB::TcsVersion::AutoPtr |
Short-cut for an auto pointer.
For details see quality manual, implementation patterns: Virtual copy construction.
Reimplemented in OSB_LIB::DistTcs, and OSB_LIB::MappingDistTcs.
Definition at line 377 of file tariffclass.h.
typedef Id2<TcsVersion> OSB_LIB::TcsVersion::Oid |
Unique id of tariff classification system and version number of tariff classification system configuration are kept in template Id2.
Definition at line 370 of file tariffclass.h.
OSB_LIB::TcsVersion::TcsVersion | ( | const TcSystem::Oid & | tcsId | ) | [explicit] |
Create a tariff classification system version.
tcsId | Object id of the tariff classification system. |
virtual OSB_LIB::TcsVersion::~TcsVersion | ( | ) | [virtual] |
Virtual destructor.
virtual bool OSB_LIB::TcsVersion::canFreeze | ( | const OSB_DB::Session & | session, | |
OsbErrors & | errors | |||
) | const [private, pure virtual] |
Criteria checking before setting the status from editable to standby.
session | Database session used. | |
errors | Container for detected errors. |
Implemented in OSB_LIB::DistTcs, and OSB_LIB::MappingDistTcs.
virtual bool OSB_LIB::TcsVersion::canRelease | ( | const OSB_DB::Session & | session, | |
OsbErrors & | errors | |||
) | const [private, pure virtual] |
Criteria checking before setting the status from standby to release.
session | Database session used. | |
errors | Container for detected errors. |
Implemented in OSB_LIB::DistTcs, and OSB_LIB::MappingDistTcs.
virtual bool OSB_LIB::TcsVersion::canRevoke | ( | const OSB_DB::Session & | session, | |
OsbErrors & | errors | |||
) | const [private, pure virtual] |
Criteria checking before setting the status from release to standby.
session | Database session used. | |
errors | Container for detected errors. |
Implemented in OSB_LIB::DistTcs, and OSB_LIB::MappingDistTcs.
virtual bool OSB_LIB::TcsVersion::canUnfreeze | ( | const OSB_DB::Session & | session, | |
OsbErrors & | errors | |||
) | const [private, pure virtual] |
Criteria checking before setting the status from standby to editable.
session | Database session used. | |
errors | Container for detected errors. |
Implemented in OSB_LIB::DistTcs, and OSB_LIB::MappingDistTcs.
AutoPtr OSB_LIB::TcsVersion::clone | ( | ) | const |
Virtual copy construction.
For details see quality manual, implementation patterns.
Reimplemented in OSB_LIB::DistTcs, and OSB_LIB::MappingDistTcs.
virtual TcsVersion* OSB_LIB::TcsVersion::clone_ | ( | ) | const [private, pure virtual] |
Virtual copy construction.
For details see quality manual, implementation patterns.
Implemented in OSB_LIB::DistTcs, and OSB_LIB::MappingDistTcs.
virtual void OSB_LIB::TcsVersion::copyCfg | ( | const TcsVersion * | src | ) | [pure virtual] |
Get configuration from another TCS version.
src | TCS version from which to copy the configuration. |
OsbException | if src has a different TCS type. |
Implemented in OSB_LIB::DistTcs, and OSB_LIB::MappingDistTcs.
virtual bool OSB_LIB::TcsVersion::delSpecific | ( | const OSB_DB::Session & | session | ) | [private, pure virtual] |
Remove derived class specific data members from database.
session | Database session. |
Implemented in OSB_LIB::DistTcs, and OSB_LIB::MappingDistTcs.
bool OSB_LIB::TcsVersion::freeze | ( | const OSB_DB::Session & | session, | |
OsbErrors & | errors | |||
) | [virtual] |
Set the status from editable to standby.
In order to freeze a tariff classification system version, the following criteria must be fulfilled:
session | Database session used. | |
errors | Container for detected errors. |
Implements OSB_LIB::ToCfgBase.
virtual TariffClass::Oid OSB_LIB::TcsVersion::getTc | ( | Cdr & | cdr, | |
UsedService & | service | |||
) | const [pure virtual] |
Get the tariff class applicable.
cdr | Call record to classify. | |
service | Used service to classify. |
Implemented in OSB_LIB::DistTcs, and OSB_LIB::MappingDistTcs.
bool OSB_LIB::TcsVersion::insert | ( | const OSB_DB::Session & | session | ) | [private] |
This function allow a tariff system version to insert itself into database.
The object's id is not set before the function call. If the function completed successfully, the object will have it's id set, else the id will still be the same (not set).
session | database session. |
OsbException | for the following errors:
|
virtual bool OSB_LIB::TcsVersion::insSpecific | ( | const OSB_DB::Session & | session | ) | [private, pure virtual] |
Insert derived class specific data members into database.
session | Database session. |
Implemented in OSB_LIB::DistTcs, and OSB_LIB::MappingDistTcs.
const T * OSB_LIB::TcsVersion::isa | ( | const T *& | ptr | ) | const |
Downcasting: see template<typename T> T* isa(T*& ptr).
Definition at line 930 of file tariffclass.h.
T * OSB_LIB::TcsVersion::isa | ( | T *& | ptr | ) |
Downcast to a derived class.
The function uses dynamic_cast<T*> to downcast an object of TcsVersion to an object of a derived class.
ptr = dynamic_cast<T*>(this); return ptr;
An example is given below:
class DerivedTcs : public TcsVersion { ... }; void foo(const TcsVersion& tcsVs) { ... DerivedTcs *pTcs; if (0 != tcsVs.isa(pTcs)) { // work with newTcs. } }
ptr | Pointer to cast to. It gets the result of the downcast. It's value will be 0 if the cast fails. |
Definition at line 924 of file tariffclass.h.
const Oid& OSB_LIB::TcsVersion::oid | ( | ) | const |
Return the oid of this tarif classification system version.
TcsVersion& OSB_LIB::TcsVersion::operator= | ( | const TcsVersion & | rhs | ) | [protected] |
Assignment operator.
bool OSB_LIB::TcsVersion::read | ( | const OSB_DB::Session & | session | ) |
This function allow a tariff system version to read itself from database.
Object id must be set before the function call. The id is used to retrieve other details from database and populate the object.
session | Database session. |
OsbException | for database errors. |
virtual bool OSB_LIB::TcsVersion::readSpecific | ( | const OSB_DB::Session & | session | ) | [private, pure virtual] |
Read derived class specific data members from database.
session | Database session. |
Implemented in OSB_LIB::DistTcs, and OSB_LIB::MappingDistTcs.
bool OSB_LIB::TcsVersion::release | ( | const OSB_DB::Session & | session, | |
OsbErrors & | errors | |||
) | [virtual] |
Set the status from standby to release.
In order to release a tariff classification system version, the following criteria must be fulfilled:
Afterwards the virtual member canRelease() is called for any TCS type specific checks.
session | Database session used. | |
errors | Container for detected errors. |
Implements OSB_LIB::ToCfgBase.
bool OSB_LIB::TcsVersion::remove | ( | const OSB_DB::Session & | session | ) | [private] |
This function allow tariff system version to remove itself from database.
Object id must be set before the function call. The id will be unset if the function completed successfully, else no changes to the object.
session | Database session. |
OsbException | for the following errors:
|
bool OSB_LIB::TcsVersion::revoke | ( | const OSB_DB::Session & | session, | |
OsbErrors & | errors | |||
) | [virtual] |
Set the status from release to standby.
In order to revoke a tariff classification system version, the following criteria must be fulfilled:
session | Database session used. | |
errors | Container for detected errors. |
Implements OSB_LIB::ToCfgBase.
virtual void OSB_LIB::TcsVersion::supportedTc | ( | std::set< TariffClass::Oid > & | tcOids | ) | const [pure virtual] |
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. |
const TcSystem::Oid OSB_LIB::TcsVersion::tcsId | ( | ) | const |
Return the tariff classification system id.
virtual TcSystem::TcsType OSB_LIB::TcsVersion::type | ( | ) | const [pure virtual] |
Return the type of tariff classification system version.
Implemented in OSB_LIB::DistTcs, and OSB_LIB::MappingDistTcs.
bool OSB_LIB::TcsVersion::unfreeze | ( | const OSB_DB::Session & | session, | |
OsbErrors & | errors | |||
) | [virtual] |
Set the status from standby to editable.
In order to unfreeze a tariff classification system version, the following criteria must be fulfilled:
session | Database session used. | |
errors | Container for detected errors. |
Implements OSB_LIB::ToCfgBase.
bool OSB_LIB::TcsVersion::update | ( | const OSB_DB::Session & | session | ) | [private] |
This function allow tariff system version to update itself into database.
This function will update an existing tariff system version object in the database. If the function completed successfully, the object's objVs will increment by 1.
session | Database session. |
OsbException | for the following errors:
|
virtual bool OSB_LIB::TcsVersion::updSpecific | ( | const OSB_DB::Session & | session | ) | [private, pure virtual] |
Update derived class specific data members into database.
session | Database session. |
Implemented in OSB_LIB::DistTcs, and OSB_LIB::MappingDistTcs.
long OSB_LIB::TcsVersion::vs | ( | ) | const |
Return the version number of tariff classification system.
friend struct OSB_DB::TcsVersionGw [friend] |
The database gateway need to populate data members after construction.
Definition at line 358 of file tariffclass.h.
friend class TariffCatalogue [friend] |
The tariff catalogue is the only object that is allow to invoke the database functions of this class.
Definition at line 363 of file tariffclass.h.
Oid OSB_LIB::TcsVersion::oid_ [private] |