#include <ored/portfolio/referencedatafactory.hpp>
Definition at line 53 of file referencedatafactory.hpp.
◆ map_type
◆ build()
QuantLib::ext::shared_ptr< ReferenceDatum > build |
( |
const std::string & |
refDatumType | ) |
|
Definition at line 28 of file referencedatafactory.cpp.
28 {
29 boost::shared_lock<boost::shared_mutex> lock(
mutex_);
30 auto it =
map_.find(refDatumType);
32 return nullptr;
33 return it->second()->build();
34}
boost::shared_mutex mutex_
◆ addBuilder()
void addBuilder |
( |
const std::string & |
refDatumType, |
|
|
std::function< QuantLib::ext::shared_ptr< AbstractReferenceDatumBuilder >()> |
builder, |
|
|
const bool |
allowOverwrite = false |
|
) |
| |
Definition at line 36 of file referencedatafactory.cpp.
38 {
39 boost::unique_lock<boost::shared_mutex> lock(
mutex_);
40 QL_REQUIRE(
map_.insert(std::make_pair(refDatumType, builder)).second,
41 "ReferenceDatumFactory::addBuilder(" << refDatumType << "): builder for key already exists.");
42}
◆ QuantLib::Singleton< ReferenceDatumFactory, std::integral_constant< bool, true > >
◆ mutex_
boost::shared_mutex mutex_ |
|
private |
◆ map_