GenericEngine< ArgumentsType, ResultsType > Class Template Reference

template base class for option pricing engines More...

`#include <ql/pricingengine.hpp>`

Inheritance diagram for GenericEngine< ArgumentsType, ResultsType >:
[legend]

## Public Member Functions

PricingEngine::arguments * | getArguments () const
const PricingEngine::results * | getResults () const
void | reset ()
void | update ()
Public Member Functions inherited from PricingEngine
virtual void | calculate () const =0
Public Member Functions inherited from Observable
| Observable (const Observable &)
Observable & | operator= (const Observable &)
void | notifyObservers ()
Public Member Functions inherited from Observer
| Observer (const Observer &)
Observer & | operator= (const Observer &)
std::pair< iterator, bool > | registerWith (const boost::shared_ptr< Observable > &)
void | registerWithObservables (const boost::shared_ptr< Observer > &)
Size | unregisterWith (const boost::shared_ptr< Observable > &)
void | unregisterWithAll ()
virtual void | deepUpdate ()

## Protected Attributes

ArgumentsType | arguments_
ResultsType | results_

## Additional Inherited Members

Public Types inherited from Observer
typedef std::set< boost::shared_ptr< Observable > > | set_type
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

## update()

void update | ( |  | ) |

virtual

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< CapFloor::arguments, CapFloor::results >, LatticeShortRateModelEngine< VanillaSwap::arguments, VanillaSwap::results >, LatticeShortRateModelEngine< Swaption::arguments, Swaption::results >, and LatticeShortRateModelEngine< CallableBond::arguments, CallableBond::results >.