QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
GenericEngine< ArgumentsType, ResultsType > Class Template Reference

template base class for option pricing engines More...

#include <pricingengine.hpp>

+ Inheritance diagram for GenericEngine< ArgumentsType, ResultsType >:
+ Collaboration diagram for GenericEngine< ArgumentsType, ResultsType >:

Public Member Functions

PricingEngine::argumentsgetArguments () const override
 
const PricingEngine::resultsgetResults () const override
 
void reset () override
 
void update () override
 
- Public Member Functions inherited from PricingEngine
 ~PricingEngine () override=default
 
virtual argumentsgetArguments () const =0
 
virtual const resultsgetResults () const =0
 
virtual void reset ()=0
 
virtual void calculate () const =0
 
- Public Member Functions inherited from Observable
 Observable ()
 
 Observable (const Observable &)
 
Observableoperator= (const Observable &)
 
 Observable (Observable &&)=delete
 
Observableoperator= (Observable &&)=delete
 
virtual ~Observable ()=default
 
void notifyObservers ()
 
- Public Member Functions inherited from Observer
 Observer ()=default
 
 Observer (const Observer &)
 
Observeroperator= (const Observer &)
 
virtual ~Observer ()
 
std::pair< iterator, boolregisterWith (const ext::shared_ptr< Observable > &)
 
void registerWithObservables (const ext::shared_ptr< Observer > &)
 
Size unregisterWith (const ext::shared_ptr< Observable > &)
 
void unregisterWithAll ()
 
virtual void update ()=0
 
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.

Definition at line 63 of file pricingengine.hpp.

Member Function Documentation

◆ getArguments()

PricingEngine::arguments * getArguments ( ) const
overridevirtual

Implements PricingEngine.

Definition at line 66 of file pricingengine.hpp.

+ Here is the caller graph for this function:

◆ getResults()

const PricingEngine::results * getResults ( ) const
overridevirtual

Implements PricingEngine.

Definition at line 67 of file pricingengine.hpp.

+ Here is the caller graph for this function:

◆ reset()

void reset ( )
overridevirtual

Implements PricingEngine.

Definition at line 68 of file pricingengine.hpp.

◆ update()

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 >, LatticeShortRateModelEngine< VanillaSwap::arguments, VanillaSwap::results >, AnalyticHestonHullWhiteEngine, COSHestonEngine, FdHestonHullWhiteVanillaEngine, and FdHestonVanillaEngine.

Definition at line 69 of file pricingengine.hpp.

+ Here is the call graph for this function:

Member Data Documentation

◆ arguments_

ArgumentsType arguments_
mutableprotected

Definition at line 72 of file pricingengine.hpp.

◆ results_

ResultsType results_
mutableprotected

Definition at line 73 of file pricingengine.hpp.