For each Cdr::UsageType the class stores a list of rated party evaluators (RatedPartyEval) for that usage type.
A dedicated configuration can be defined for each network and element. Rating will use the most specialized configuration to determine the rated parties.
Definition at line 78 of file rpevalmgr.h.
typedef std::map<NeId, UsgEvalMap> OSB_LIB::RpEvalMgr::EvalMap |
Rated party evaluators by network and network element.
The key of the map may not be set at all, i.e., the default configuration; or only have the network set, i.e., the default configuration for all elements of this network.
Definition at line 109 of file rpevalmgr.h.
typedef std::map<NeId, ModInfo> OSB_LIB::RpEvalMgr::ModInfos [private] |
Definition at line 328 of file rpevalmgr.h.
typedef Id2<NetworkElement> OSB_LIB::RpEvalMgr::NeId |
typedef std::map<RpType, RatedPartyEval*> OSB_LIB::RpEvalMgr::RpEvals |
typedef TypeId<RatedParty> OSB_LIB::RpEvalMgr::RpType |
typedef std::map<UsgType, RpEvals> OSB_LIB::RpEvalMgr::UsgEvalMap |
Rated party evaluators for one usage type.
Definition at line 99 of file rpevalmgr.h.
typedef TypeId<Cdr, 1> OSB_LIB::RpEvalMgr::UsgType |
OSB_LIB::RpEvalMgr::RpEvalMgr | ( | ) |
Empty default constructor.
OSB_LIB::RpEvalMgr::~RpEvalMgr | ( | ) |
Destructor: delete entries in evalMap_.
OSB_LIB::RpEvalMgr::RpEvalMgr | ( | const RpEvalMgr & | ) | [private] |
Prevent copying until needed: not implemented.
void OSB_LIB::RpEvalMgr::add | ( | const NeId & | neId, | |
long | objVs, | |||
const UsageType & | usgType, | |||
std::auto_ptr< RatedPartyEval > | rpEval | |||
) | [private] |
Add a rated party evaluator.
neId | Id of the network and element for the evaluator. It needn't be set. | |
objVs | Object version for neId. | |
usgType | Usage type for which the evaluator is valid. | |
rpEval | Rated party evaluator to add, it must not be 0. |
EvalExists | if an evaluator is already defined for the usage and rated party type (not the evaluator's type). |
void OSB_LIB::RpEvalMgr::clear | ( | ) |
Clear the map rated party evaluators.
const RatedPartyEval* OSB_LIB::RpEvalMgr::find | ( | const NeId & | neId, | |
const UsgType & | usgType, | |||
const RpType & | rpType | |||
) | const |
Get the rated party evaluator for a usage type and rated party type.
neId | The id of the network element, see find(const NeId&) for details. | |
usgType | Usage type for which the get the evaluator. | |
rpType | The rated party for which to get the evaluator. |
Get the rated party evaluators for a usage type.
neId | The id of the network element, see find(const NeId&) for details. | |
usgType | Usage type for which the get list. |
const UsgEvalMap* OSB_LIB::RpEvalMgr::find | ( | const NeId & | neId | ) | const |
Get the rated party evaluators for all usage types of a network and/or element.
neId | The id of the network element for which to get the rateable party configuration. It may not be set (default configuration) or only the network may be set (default for all elements of the network). |
const RatedPartyEval* OSB_LIB::RpEvalMgr::getEval | ( | const NeId & | neId, | |
const UsgType & | usgType, | |||
const RpType & | rpType | |||
) | const |
Get the rated party evaluator for a usage and rated party type.
neId | The id of the network element, see getEvals() for details. | |
usgType | Usage type for which the get the evaluator. | |
rpType | The rated party for which to get the evaluator. |
Get the rated party evaluators for a usage type.
neId | The id of the network element for which to get the rateable party configuration. It may not be set (default configuration) or only the network may be set (default for all elements of the network). | |
usgType | Usage type for which the get list. |
Prevent assignment until needed: not implemented.
void OSB_LIB::RpEvalMgr::read | ( | const OSB_DB::Session & | session | ) |
Read the whole rating configuration from the database.
session | Database session to use. |
OsbException | if the type of a rated party evaluator is not valid. |
void OSB_LIB::RpEvalMgr::remove | ( | const NeId & | neId, | |
const UsageType & | usgType, | |||
const RpType & | rpType | |||
) |
Remove a rated party evaluator.
neId | Id of the network and element for the evaluator. It needn't be set. | |
usgType | Usage type for which to remove the evaluator. | |
rpType | The rated party type for which to remove the evaluator. |
void OSB_LIB::RpEvalMgr::replace | ( | const NeId & | neId, | |
const UsageType & | usgType, | |||
std::auto_ptr< RatedPartyEval > | rpEval | |||
) |
Replace a rated party evaluator.
neId | Id of the network and element for the evaluator. It needn't be set. | |
usgType | Usage type for which the evaluator is valid. | |
rpEval | Rated party evaluator to replace, it must not be 0. |
bool OSB_LIB::RpEvalMgr::resourceCacheNeeded | ( | ) | const |
Resource cache needed?
void OSB_LIB::RpEvalMgr::save | ( | const OSB_DB::Session & | session | ) |
Store the rating configuration to the database.
session | Database session to use. |
friend class OSB_DB::RpEvalGw [friend] |
EvalMap OSB_LIB::RpEvalMgr::evalMap_ [private] |
ModInfos OSB_LIB::RpEvalMgr::modInfo_ [private] |