21#include <ql/event.hpp>
22#include <ql/patterns/visitor.hpp>
23#include <ql/optional.hpp>
24#include <ql/settings.hpp>
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