QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
|
Base class for event. More...
#include <event.hpp>
Public Member Functions | |
~Event () override=default | |
Event interface | |
virtual Date | date () const =0 |
returns the date at which the event occurs More... | |
virtual bool | hasOccurred (const Date &refDate=Date(), ext::optional< bool > includeRefDate=ext::nullopt) const |
returns true if an event has already occurred before a date More... | |
Visitability | |
virtual void | accept (AcyclicVisitor &) |
Public Member Functions inherited from Observable | |
Observable () | |
Observable (const Observable &) | |
Observable & | operator= (const Observable &) |
Observable (Observable &&)=delete | |
Observable & | operator= (Observable &&)=delete |
virtual | ~Observable ()=default |
void | notifyObservers () |
Base class for event.
This class acts as a base class for the actual event implementations.
|
overridedefault |
|
pure virtual |
returns the date at which the event occurs
Implemented in Coupon, Dividend, IndexedCashFlow, SimpleCashFlow, simple_event, CommodityCashFlow, DefaultEvent::DefaultSettlement, DefaultEvent, Callability, and CashFlow.
|
virtual |
returns true if an event has already occurred before a date
If includeRefDate is true, then an event has not occurred if its date is the same as the refDate, i.e. this method returns false if the event date is the same as the refDate.
Reimplemented in CashFlow.
Definition at line 28 of file event.cpp.
|
virtual |
Reimplemented in CashFlow, AverageBMACoupon, CappedFlooredCoupon, CmsCoupon, Coupon, CPICoupon, DigitalCmsCoupon, DigitalCoupon, DigitalIborCoupon, Dividend, EquityCashFlow, FixedRateCoupon, FloatingRateCoupon, IborCoupon, IndexedCashFlow, InflationCoupon, OvernightIndexedCoupon, RangeAccrualFloatersCoupon, SimpleCashFlow, Redemption, AmortizingPayment, SubPeriodsCoupon, YoYInflationCoupon, ZeroInflationCashFlow, CommodityCashFlow, CmsSpreadCoupon, DigitalCmsSpreadCoupon, StrippedCappedFlooredCoupon, DefaultEvent::DefaultSettlement, DefaultEvent, Callability, CappedFlooredIborCoupon, CappedFlooredCmsCoupon, CappedFlooredYoYInflationCoupon, and CappedFlooredCmsSpreadCoupon.
Definition at line 41 of file event.cpp.