#include <orea/simm/simmbucketmapper.hpp>
Definition at line 33 of file simmbucketmapper.hpp.
◆ ~SimmBucketMapper()
◆ bucket()
virtual std::string bucket |
( |
const CrifRecord::RiskType & |
riskType, |
|
|
const std::string & |
qualifier |
|
) |
| const |
|
pure virtual |
Return the SIMM bucket for a given SIMM RiskType and SIMM Qualifier (using valid mappings only)
- Warning:
- An error is thrown if there is no bucket for the combination.
Implemented in SimmBucketMapperBase.
◆ hasBuckets()
◆ has()
virtual bool has |
( |
const CrifRecord::RiskType & |
riskType, |
|
|
const std::string & |
qualifier, |
|
|
boost::optional< bool > |
fallback = boost::none |
|
) |
| const |
|
pure virtual |
Check if the given riskType
and qualifier
has a mapping (which is valid, and matches the fallback flag if given)
Implemented in SimmBucketMapperBase.
◆ addMapping()
virtual void addMapping |
( |
const CrifRecord::RiskType & |
riskType, |
|
|
const std::string & |
qualifier, |
|
|
const std::string & |
bucket, |
|
|
const std::string & |
validFrom = "" , |
|
|
const std::string & |
validTo = "" , |
|
|
bool |
fallback = false |
|
) |
| |
|
pure virtual |
Add a single bucket
mapping for qualifier
with risk type riskType
.
Implemented in SimmBucketMapperBase.
◆ failedMappings()
virtual const std::set< FailedMapping > & failedMappings |
( |
| ) |
const |
|
pure virtual |
◆ updateFromCrif()
Definition at line 67 of file simmbucketmapper.hpp.
67 {
68 for (const auto& cr : crif) {
69 if (!cr.isSimmParameter() &&
hasBuckets(cr.riskType)) {
70 addMapping(cr.riskType, cr.qualifier, cr.bucket);
71 }
72 }
73 }
virtual bool hasBuckets(const CrifRecord::RiskType &riskType) const =0
Check if the given SIMM RiskType has a bucket structure.
virtual void addMapping(const CrifRecord::RiskType &riskType, const std::string &qualifier, const std::string &bucket, const std::string &validFrom="", const std::string &validTo="", bool fallback=false)=0
Add a single bucket mapping for qualifier with risk type riskType.