25#ifndef quantlib_payoff_hpp
26#define quantlib_payoff_hpp
45 virtual std::string
name()
const = 0;
63 QL_FAIL(
"not a payoff visitor");
degenerate base class for the Acyclic Visitor pattern
Abstract base class for option payoffs.
virtual ~Payoff()=default
virtual void accept(AcyclicVisitor &)
virtual Real operator()(Real price) const =0
virtual std::string description() const =0
virtual std::string name() const =0
Visitor for a specific class
virtual void visit(T &)=0
Classes and functions for error handling.
#define QL_FAIL(message)
throw an error (possibly with file and line information)
ext::shared_ptr< BlackVolTermStructure > v
degenerate base class for the Acyclic Visitor pattern