QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
Public Member Functions | List of all members
Event Class Referenceabstract

Base class for event. More...

#include <event.hpp>

+ Inheritance diagram for Event:
+ Collaboration diagram for Event:

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 &)
 
Observableoperator= (const Observable &)
 
 Observable (Observable &&)=delete
 
Observableoperator= (Observable &&)=delete
 
virtual ~Observable ()=default
 
void notifyObservers ()
 

Detailed Description

Base class for event.

This class acts as a base class for the actual event implementations.

Definition at line 40 of file event.hpp.

Constructor & Destructor Documentation

◆ ~Event()

~Event ( )
overridedefault

Member Function Documentation

◆ date()

virtual Date date ( ) const
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.

+ Here is the caller graph for this function:

◆ hasOccurred()

bool hasOccurred ( const Date refDate = Date(),
ext::optional< bool includeRefDate = ext::nullopt 
) const
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.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ accept()

void accept ( AcyclicVisitor v)
virtual