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

Interface for Reference Data lookups. More...

#include <ored/portfolio/referencedata.hpp>

+ Inheritance diagram for ReferenceDataManager:
+ Collaboration diagram for ReferenceDataManager:

Public Member Functions

virtual ~ReferenceDataManager ()
 
virtual bool hasData (const string &type, const string &id, const QuantLib::Date &asof=QuantLib::Null< QuantLib::Date >())=0
 
virtual QuantLib::ext::shared_ptr< ReferenceDatumgetData (const string &type, const string &id, const QuantLib::Date &asof=QuantLib::Null< QuantLib::Date >())=0
 
virtual void add (const QuantLib::ext::shared_ptr< ReferenceDatum > &referenceDatum)=0
 

Detailed Description

Interface for Reference Data lookups.

The ReferenceDataManager is a repository of ReferenceDatum objects.

This is an interface, there is a concrete impl below that is BasicReferenceDataManager which is filebased. It is also possible to have a transactional implementation that will fetch reference data from a DB or via a restful call, possibly with a cache.

An instance of this class is made available to Trades as they are built, this code be done with a singleton but it is clearer to pass a pointer to an instance when the Trade is built itself, as there is no access method for Trade::build() we instead pass a pointer to the Trade constructors, this is then populated when TradeBuilders are created for ORE+ trades, this also allows us to have custom ORE+ versions of Trades that overload the build() method to use this data in place of extracting it from XML.

The actual Trade objects will take a copy of any reference data they need, this way they own all the required data and a call to "Trade::toXML()" will write out the "full" trade. For example we might load a CDS Index trade using reference data from which the basket is created, but if we call "toXML()" on that CDS Index the trade the whole basket will be written out.

Definition at line 549 of file referencedata.hpp.

Constructor & Destructor Documentation

◆ ~ReferenceDataManager()

virtual ~ReferenceDataManager ( )
virtual

Definition at line 551 of file referencedata.hpp.

551{}

Member Function Documentation

◆ hasData()

virtual bool hasData ( const string &  type,
const string &  id,
const QuantLib::Date &  asof = QuantLib::Null< QuantLib::Date >() 
)
pure virtual

Implemented in BasicReferenceDataManager.

◆ getData()

virtual QuantLib::ext::shared_ptr< ReferenceDatum > getData ( const string &  type,
const string &  id,
const QuantLib::Date &  asof = QuantLib::Null< QuantLib::Date >() 
)
pure virtual

Implemented in BasicReferenceDataManager.

◆ add()

virtual void add ( const QuantLib::ext::shared_ptr< ReferenceDatum > &  referenceDatum)
pure virtual

Implemented in BasicReferenceDataManager.