Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
simmnamemapper.hpp
Go to the documentation of this file.
1/*
2 Copyright (C) 2018 Quaternion Risk Management Ltd
3 All rights reserved.
4
5 This file is part of ORE, a free-software/open-source library
6 for transparent pricing and risk analysis - http://opensourcerisk.org
7
8 ORE is free software: you can redistribute it and/or modify it
9 under the terms of the Modified BSD License. You should have received a
10 copy of the license along with this program.
11 The license is also available online at <http://opensourcerisk.org>
12
13 This program is distributed on the basis that it will form a useful
14 contribution to risk analytics and model standardisation, but WITHOUT
15 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
16 FITNESS FOR A PARTICULAR PURPOSE. See the license for more details.
17*/
18
19/*! \file orea/simm/simmnamemapper.hpp
20 \brief Abstract base class for classes that map names to SIMM qualifiers
21*/
22
23#pragma once
24
25#include <string>
26#include <ql/time/date.hpp>
27
28namespace ore {
29namespace analytics {
30
32public:
33 //! Destructor
34 virtual ~SimmNameMapper() {}
35
36 /*! Return the SIMM <em>Qualifier</em> for a given external name.
37
38 For example, an external name may be an ORE name for an equity.
39 This should give back the SIMM <em>Qualifier</em>, i.e. in this
40 case the ISIN in the form 'ISIN:XXXXXXXXXXXX' for that equity.
41
42 This method should always return a value, if hasQualifier is false
43 it should return the input externalName
44 */
45 virtual std::string qualifier(const std::string& externalName) const = 0;
46
47 /*! Return if this qualifier has a mapping or not
48 */
49 virtual bool hasQualifier(const std::string& externalName) const = 0;
50
51 /*! return the reverse lookup on qualifier
52 */
53 virtual std::string externalName(const std::string& qualifier) const = 0;
54
55 /*! \todo Possibly extend the interface to have a method like the following:
56 \code{.cpp}
57 virtual std::string qualifier(const std::string& externalName,
58 const SimmConfiguration::RiskType& riskType) const = 0;
59 \endcode
60 */
61};
62
63} // namespace analytics
64} // namespace ore
virtual std::string qualifier(const std::string &externalName) const =0
virtual ~SimmNameMapper()
Destructor.
virtual bool hasQualifier(const std::string &externalName) const =0
virtual std::string externalName(const std::string &qualifier) const =0