QuantLib: a free/open-source library for quantitative finance
Reference manual - version 1.40
Loading...
Searching...
No Matches
GenericEngine< ArgumentsType, ResultsType > Class Template Reference

template base class for option pricing engines More...

#include <ql/pricingengine.hpp>

Inheritance diagram for GenericEngine< ArgumentsType, ResultsType >:

Public Member Functions

PricingEngine::arguments * getArguments () const override
const PricingEngine::results * getResults () const override
void reset () override
void update () override
Public Member Functions inherited from PricingEngine
virtual void calculate () const =0
Public Member Functions inherited from Observable
 Observable (const Observable &)
Observableoperator= (const Observable &)
 Observable (Observable &&)=delete
Observableoperator= (Observable &&)=delete
void notifyObservers ()
Public Member Functions inherited from Observer
 Observer (const Observer &)
Observeroperator= (const 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 deepUpdate ()

Protected Attributes

ArgumentsType arguments_
ResultsType results_

Additional Inherited Members

Public Types inherited from Observer
typedef set_type::iterator iterator

Detailed Description

template<class ArgumentsType, class ResultsType>
class QuantLib::GenericEngine< ArgumentsType, ResultsType >

template base class for option pricing engines

Derived engines only need to implement the calculate() method.

Member Function Documentation

◆ getArguments()

template<class ArgumentsType, class ResultsType>
PricingEngine::arguments * getArguments ( ) const
overridevirtual

Implements PricingEngine.

◆ getResults()

template<class ArgumentsType, class ResultsType>
const PricingEngine::results * getResults ( ) const
overridevirtual

Implements PricingEngine.

◆ reset()

template<class ArgumentsType, class ResultsType>
void reset ( )
overridevirtual

Implements PricingEngine.

◆ update()

template<class ArgumentsType, class ResultsType>
void update ( )
overridevirtual

This method must be implemented in derived classes. An instance of Observer does not call this method directly: instead, it will be called by the observables the instance registered with when they need to notify any changes.

Implements Observer.

Reimplemented in LatticeShortRateModelEngine< Arguments, Results >, LatticeShortRateModelEngine< CallableBond::arguments, CallableBond::results >, LatticeShortRateModelEngine< CapFloor::arguments, CapFloor::results >, LatticeShortRateModelEngine< Swaption::arguments, Swaption::results >, and LatticeShortRateModelEngine< VanillaSwap::arguments, VanillaSwap::results >.