#include <ored/portfolio/trsunderlyingbuilder.hpp>
Definition at line 50 of file trsunderlyingbuilder.hpp.
◆ getBuilders()
Definition at line 56 of file trsunderlyingbuilder.hpp.
56 {
57 boost::shared_lock<boost::shared_mutex> lock(
mutex_);
59 }
map< std::string, QuantLib::ext::shared_ptr< TrsUnderlyingBuilder > > builders_
boost::shared_mutex mutex_
◆ getBuilder()
Definition at line 63 of file trsunderlyingbuilder.cpp.
63 {
64 boost::shared_lock<boost::shared_mutex> lock(
mutex_);
66 QL_REQUIRE(b !=
builders_.end(),
"TrsUnderlyingBuilderFactory::getBuilder(" << tradeType <<
"): no builder found");
67 return b->second;
68}
◆ addBuilder()
void addBuilder |
( |
const std::string & |
tradeType, |
|
|
const QuantLib::ext::shared_ptr< TrsUnderlyingBuilder > & |
builder, |
|
|
const bool |
allowOverwrite = false |
|
) |
| |
Definition at line 70 of file trsunderlyingbuilder.cpp.
72 {
73 boost::unique_lock<boost::shared_mutex> locK(
mutex_);
74 QL_REQUIRE(
builders_.insert(std::make_pair(tradeType, builder)).second || allowOverwrite,
75 "TrsUnderlyingBuidlerFactory::addBuilder(" << tradeType << "): builder for key already exists.");
76}
◆ builders_
◆ mutex_
boost::shared_mutex mutex_ |
|
mutableprivate |