29 ext::optional<bool> includeRefDate)
const {
32 bool includeRefDateEvent = includeRefDate ?
35 if (includeRefDateEvent)
36 return date() < refDate;
38 return date() <= refDate;
46 QL_FAIL(
"not an event visitor");
degenerate base class for the Acyclic Visitor pattern
virtual void accept(AcyclicVisitor &)
virtual Date date() const =0
returns the date at which the event occurs
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
bool & includeReferenceDateEvents()
DateProxy & evaluationDate()
the date at which pricing is to be performed.
static Settings & instance()
access to the unique instance
Visitor for a specific class
virtual void visit(T &)=0
#define QL_FAIL(message)
throw an error (possibly with file and line information)
Base class for events associated with a given date.
Maps optional to either the boost or std implementation.
ext::shared_ptr< BlackVolTermStructure > v
global repository for run-time library settings
degenerate base class for the Acyclic Visitor pattern