25#ifndef quantlib_cash_flow_hpp
26#define quantlib_cash_flow_hpp
52 ext::optional<bool> includeRefDate =
ext::nullopt)
const override;
78 typedef std::vector<ext::shared_ptr<CashFlow> >
Leg;
degenerate base class for the Acyclic Visitor pattern
Base class for cash flows.
bool hasOccurred(const Date &refDate=Date(), ext::optional< bool > includeRefDate=ext::nullopt) const override
returns true if an event has already occurred before a date
void performCalculations() const override
virtual Date exCouponDate() const
returns the date that the cash flow trades exCoupon
bool tradingExCoupon(const Date &refDate=Date()) const
returns true if the cashflow is trading ex-coupon on the refDate
void accept(AcyclicVisitor &) override
Date date() const override=0
virtual Real amount() const =0
returns the amount of the cash flow
~CashFlow() override=default
Framework for calculation on demand and result caching.
floating-point comparisons
Base class for events associated with a given date.
framework for calculation on demand and result caching
const boost::none_t & nullopt
std::vector< ext::shared_ptr< CashFlow > > Leg
Sequence of cash-flows.
Maps optional to either the boost or std implementation.
bool operator()(const CashFlow &c1, const CashFlow &c2) const
compare two objects by date