Logo
Reference manual - version orea_version
Classes | Public Member Functions | List of all members
SimmBucketMapper Class Referenceabstract
+ Inheritance diagram for SimmBucketMapper:

Classes

struct  FailedMapping
 

Public Member Functions

virtual ~SimmBucketMapper ()
 Destructor.
 
virtual std::string bucket (const CrifRecord::RiskType &riskType, const std::string &qualifier) const =0
 
virtual bool hasBuckets (const CrifRecord::RiskType &riskType) const =0
 Check if the given SIMM RiskType has a bucket structure.
 
virtual bool has (const CrifRecord::RiskType &riskType, const std::string &qualifier, boost::optional< bool > fallback=boost::none) const =0
 Check if the given riskType and qualifier has a mapping (which is valid, and matches the fallback flag if given)
 
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. More...
 
virtual const std::set< FailedMapping > & failedMappings () const =0
 
void updateFromCrif (const ore::analytics::Crif &crif)
 

Member Function Documentation

◆ 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.

◆ 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.