22#if defined(QL_PATCH_MSVC)
24#pragma warning(disable:4181)
35 explicit points_to(
const DefaultType& t) :
t(
t) {}
36 bool operator()(
const ext::shared_ptr<DefaultType>& p)
const {
49 if(mySize != lhs.
eventTypes().size())
return false;
51 for(
Size i=0; i<mySize; i++) {
64 : eventTypes_(
std::move(eventTypes)), obligationCurrency_(
std::move(cur)), seniority_(sen) {
65 std::set<AtomicDefault::Type> buffer;
67 for(
Size i=0; i< numEvents; i++)
70 "Duplicated event type in contract definition");
81 eventTypes_.push_back( ext::shared_ptr<DefaultType>(
85 eventTypes_.push_back( ext::make_shared<DefaultType>(
89 eventTypes_.push_back( ext::make_shared<DefaultType>(
95#if defined(QL_PATCH_MSVC)
Seniority seniority() const
const Currency & currency() const
const std::vector< ext::shared_ptr< DefaultType > > & eventTypes() const
std::vector< ext::shared_ptr< DefaultType > > eventTypes_
aggregation of event types for which the contract is sensitive.
Atomic credit-event type.
Failure to Pay atomic event type.
NorthAmericaCorpDefaultKey(const Currency ¤cy, Seniority sen, Period graceFailureToPay=Period(30, Days), Real amountFailure=1.e6, Restructuring::Type resType=Restructuring::CR)
Classes for default-event description.
#define QL_REQUIRE(condition, message)
throw an error if the given pre-condition is not verified
std::size_t Size
size of a container
bool operator==(const Currency &c1, const Currency &c2)
Seniority
Seniority of a bond.