OSB_LIB::RatedPartyEval Class Reference

Inheritance diagram for OSB_LIB::RatedPartyEval:

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

Collaboration graph
[legend]
List of all members.

Detailed Description

Determine a rated party for network usage.

A rated party evaluator determines if its supported party should be rated for the network usage. See getParty() for details.

Intentionally it is not task of of RatedPartyEval class to check the usage type of the CDR, therefore there's no corresponding data member.

See also:
RpEvalUsgMap which holds the list of evaluators for each usage type.

RpEvalType which defines symbolic constants for all supported types.

Definition at line 78 of file rpeval.h.

Public Types

Public Member Functions

Protected Member Functions

Private Member Functions

Private Attributes

Friends


Member Typedef Documentation

typedef Id<RatedPartyEval> OSB_LIB::RatedPartyEval::Oid

Type-safe object identifier.

Definition at line 83 of file rpeval.h.

typedef TypeId<RatedParty> OSB_LIB::RatedPartyEval::RpType

Short-hand for type of the generated rated party.

Definition at line 87 of file rpeval.h.

typedef TypeId<RatedPartyEval> OSB_LIB::RatedPartyEval::Type

The type of the evaluator.

Definition at line 85 of file rpeval.h.


Member Enumeration Documentation

enum OSB_LIB::RatedPartyEval::Result

Possible result for getParty().

Enumerator:
noCdr  No CDR should be generated for the evaluated party.
evalError  An error has occurred during the evaluation of the rated party.
useRatedParty  Use the rated party as set by the evaluator.
useCache  Use the resource cache to determine the tariff system based on RatedParty::resourceKey_.

Definition at line 90 of file rpeval.h.


Constructor & Destructor Documentation

OSB_LIB::RatedPartyEval::RatedPartyEval ( const Oid oid,
const RpType rpType 
)

Constructor with object id and supported rated party type.

virtual OSB_LIB::RatedPartyEval::~RatedPartyEval (  )  [virtual]

Empty virtual destructor.

OSB_LIB::RatedPartyEval::RatedPartyEval ( const RatedPartyEval rhs  )  [protected]

Copying for derived classes only.


Member Function Documentation

Result OSB_LIB::RatedPartyEval::evalParty ( const Cdr cdr,
RatedParty rp,
OsbError error 
) const

Determine the rated party (if applicable).

Parameters:
cdr CDR for which to determine the rated party.
rp Rated party to populate.
error Gets the error detected during the determination of the rated party.
Returns:
The result of the evaluation, see below.
Verifies and sets the rated party type and then calls getParty().

If the function returns useRatedParty:

If the function returns useCache:

virtual std::string OSB_LIB::RatedPartyEval::getParam ( int  index  )  const [pure virtual]

Get a configuration parameter of the evaluator.

Parameters:
index Index of the parameter to retrieve,
the index of the 1st parameter is 0.
Returns:
The value of the parameter as in the database.
It is empty if the concrete evaluator class does not support (need) the parameter.
Note:
This function should not be called when dealing with a concrete rated party evaluator: they should provide functions to

Implemented in OSB_LIB::RpeServedNwAddr, OSB_LIB::RpeServedImsi, OSB_LIB::RpEvalTrunk, and OSB_LIB::RpEvalFixedTs.

virtual Result OSB_LIB::RatedPartyEval::getParty ( const Cdr cdr,
RatedParty rp,
OsbError error 
) const [private, pure virtual]

Determine the rated party (if applicable).

Parameters:
cdr CDR for which to determine the rated party.
rp Rated party to populate (see below).
error Gets the error detected during the determination of the rated party.
Returns:
The result of the evaluation, see below.
The function is called from evalParty() which clears rp and sets its type.

If the function returns useRatedParty:

If the function returns useCache:

Implemented in OSB_LIB::RpeServedNwAddr, OSB_LIB::RpeServedImsi, OSB_LIB::RpeInTrunk, OSB_LIB::RpeOutTrunk, and OSB_LIB::RpEvalFixedTs.

virtual int OSB_LIB::RatedPartyEval::numParam (  )  const [pure virtual]

Configuration of evaluator possible?

Returns:
The number of configuration parameters supported by the evaluator:
0 if no configuration is needed.

Implemented in OSB_LIB::RpeServedNwAddr, OSB_LIB::RpeServedImsi, OSB_LIB::RpEvalTrunk, and OSB_LIB::RpEvalFixedTs.

const RatedPartyEval::Oid & OSB_LIB::RatedPartyEval::oid (  )  const [inline]

Object id.

Definition at line 258 of file rpeval.h.

References oid_.

RatedPartyEval& OSB_LIB::RatedPartyEval::operator= ( const RatedPartyEval rhs  )  [protected]

Assignment for derived classes only.

virtual bool OSB_LIB::RatedPartyEval::requiresCache (  )  const [pure virtual]

Resource cache needed for the evaluator?

Returns:
true if the evaluator requires the resource cache,
i.e., returns useCache from getParty().

Implemented in OSB_LIB::RpeServedNwAddr, OSB_LIB::RpeServedImsi, OSB_LIB::RpEvalTrunk, and OSB_LIB::RpEvalFixedTs.

RatedPartyEval::RpType OSB_LIB::RatedPartyEval::rpType (  )  const [inline]

The type of the rated party generated by the evaluator.

Definition at line 263 of file rpeval.h.

References rpType_.

virtual bool OSB_LIB::RatedPartyEval::setParam ( int  index,
const std::string &  param 
) [private, pure virtual]

Set a parameter for the evaluator.

Parameters:
index Index of the parameter to set,
the index of the 1st parameter is 0.
param Value of the parameter as in the database.
Returns:
true if the parameter index is supported and param is valid, else false.
Todo:
how to check all params are there?

Implemented in OSB_LIB::RpeServedNwAddr, OSB_LIB::RpeServedImsi, OSB_LIB::RpEvalTrunk, and OSB_LIB::RpEvalFixedTs.

virtual Type OSB_LIB::RatedPartyEval::type (  )  const [pure virtual]

The type the rated party evaluator.

Implemented in OSB_LIB::RpeServedNwAddr, OSB_LIB::RpeServedImsi, OSB_LIB::RpeInTrunk, OSB_LIB::RpeOutTrunk, and OSB_LIB::RpEvalFixedTs.


Friends And Related Function Documentation

friend class OSB_DB::RpEvalGw [friend]

Allow the gateway to call setParam().

Definition at line 80 of file rpeval.h.


Member Data Documentation

Oid OSB_LIB::RatedPartyEval::oid_ [private]

Object identifier.

Definition at line 249 of file rpeval.h.

Referenced by oid().

RpType OSB_LIB::RatedPartyEval::rpType_ [private]

The rated party type generated by the evaluator.

Definition at line 251 of file rpeval.h.

Referenced by rpType().


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