QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
|
#include <commoditycashflow.hpp>
Public Member Functions | |
CommodityCashFlow (const Date &date, Money discountedAmount, Money undiscountedAmount, Money discountedPaymentAmount, Money undiscountedPaymentAmount, Real discountFactor, Real paymentDiscountFactor, bool finalized) | |
Event interface | |
Date | date () const override |
CashFlow interface | |
Real | amount () const override |
returns the amount of the cash flow More... | |
const Currency & | currency () const |
const Money & | discountedAmount () const |
const Money & | undiscountedAmount () const |
const Money & | discountedPaymentAmount () const |
const Money & | undiscountedPaymentAmount () const |
Real | discountFactor () const |
Real | paymentDiscountFactor () const |
bool | finalized () const |
Public Member Functions inherited from CashFlow | |
~CashFlow () override=default | |
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 More... | |
void | performCalculations () const override |
virtual Date | exCouponDate () const |
returns the date that the cash flow trades exCoupon More... | |
bool | tradingExCoupon (const Date &refDate=Date()) const |
returns true if the cashflow is trading ex-coupon on the refDate More... | |
Public Member Functions inherited from Event | |
~Event () override=default | |
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 () |
Public Member Functions inherited from LazyObject | |
LazyObject () | |
~LazyObject () override=default | |
void | update () override |
bool | isCalculated () const |
void | forwardFirstNotificationOnly () |
void | alwaysForwardNotifications () |
void | recalculate () |
void | freeze () |
void | unfreeze () |
Public Member Functions inherited from Observer | |
Observer ()=default | |
Observer (const Observer &) | |
Observer & | operator= (const Observer &) |
virtual | ~Observer () |
std::pair< iterator, bool > | registerWith (const ext::shared_ptr< Observable > &) |
void | registerWithObservables (const ext::shared_ptr< Observer > &) |
Size | unregisterWith (const ext::shared_ptr< Observable > &) |
void | unregisterWithAll () |
virtual void | update ()=0 |
virtual void | deepUpdate () |
Additional Inherited Members | |
Public Types inherited from Observer | |
typedef set_type::iterator | iterator |
Protected Member Functions inherited from LazyObject | |
virtual void | calculate () const |
Protected Attributes inherited from LazyObject | |
bool | calculated_ = false |
bool | frozen_ = false |
bool | alwaysForward_ |
Definition at line 34 of file commoditycashflow.hpp.
CommodityCashFlow | ( | const Date & | date, |
Money | discountedAmount, | ||
Money | undiscountedAmount, | ||
Money | discountedPaymentAmount, | ||
Money | undiscountedPaymentAmount, | ||
Real | discountFactor, | ||
Real | paymentDiscountFactor, | ||
bool | finalized | ||
) |
Definition at line 36 of file commoditycashflow.hpp.
|
overridevirtual |
Implements CashFlow.
Definition at line 52 of file commoditycashflow.hpp.
|
overridevirtual |
returns the amount of the cash flow
Implements CashFlow.
Definition at line 56 of file commoditycashflow.hpp.
const Currency & currency | ( | ) | const |
const Money & discountedAmount | ( | ) | const |
Definition at line 62 of file commoditycashflow.hpp.
const Money & undiscountedAmount | ( | ) | const |
Definition at line 63 of file commoditycashflow.hpp.
const Money & discountedPaymentAmount | ( | ) | const |
Definition at line 64 of file commoditycashflow.hpp.
const Money & undiscountedPaymentAmount | ( | ) | const |
Definition at line 67 of file commoditycashflow.hpp.
Real discountFactor | ( | ) | const |
Definition at line 70 of file commoditycashflow.hpp.
Real paymentDiscountFactor | ( | ) | const |
Definition at line 71 of file commoditycashflow.hpp.
bool finalized | ( | ) | const |
Definition at line 72 of file commoditycashflow.hpp.
|
overridevirtual |
Reimplemented from CashFlow.
Definition at line 26 of file commoditycashflow.cpp.
|
private |
Definition at line 79 of file commoditycashflow.hpp.
|
private |
Definition at line 80 of file commoditycashflow.hpp.
|
private |
Definition at line 80 of file commoditycashflow.hpp.
|
private |
Definition at line 81 of file commoditycashflow.hpp.
|
private |
Definition at line 81 of file commoditycashflow.hpp.
|
private |
Definition at line 82 of file commoditycashflow.hpp.
|
private |
Definition at line 82 of file commoditycashflow.hpp.
|
private |
Definition at line 83 of file commoditycashflow.hpp.