Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
Classes | Public Member Functions | List of all members
SimmBucketMapper Class Referenceabstract

#include <orea/simm/simmbucketmapper.hpp>

+ Inheritance diagram for SimmBucketMapper:
+ Collaboration diagram for SimmBucketMapper:

Classes

struct  FailedMapping
 

Public Member Functions

virtual ~SimmBucketMapper ()
 Destructor. More...
 
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. More...
 
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) More...
 
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)
 

Detailed Description

Definition at line 33 of file simmbucketmapper.hpp.

Constructor & Destructor Documentation

◆ ~SimmBucketMapper()

virtual ~SimmBucketMapper ( )
virtual

Destructor.

Definition at line 41 of file simmbucketmapper.hpp.

41{}

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.

◆ hasBuckets()

virtual bool hasBuckets ( const CrifRecord::RiskType riskType) const
pure virtual

Check if the given SIMM RiskType has a bucket structure.

Implemented in SimmBucketMapperBase.

+ Here is the caller graph for this function:

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

+ Here is the caller graph for this function:

◆ failedMappings()

virtual const std::set< FailedMapping > & failedMappings ( ) const
pure virtual

Implemented in SimmBucketMapperBase.

◆ updateFromCrif()

void updateFromCrif ( const ore::analytics::Crif crif)

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.
+ Here is the call graph for this function: