Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
Public Member Functions | List of all members
ExceptionQuote Class Reference

A dummy quote class that throws an exception when value is called. More...

#include <qle/quotes/exceptionquote.hpp>

+ Inheritance diagram for ExceptionQuote:
+ Collaboration diagram for ExceptionQuote:

Public Member Functions

 ExceptionQuote (std::string exception="you've hit an 'ExceptionQuote'")
 
Inspectors
Real quote () const
 
Quote interface
Real value () const override
 
bool isValid () const override
 

Observer interface

std::string exception_
 
void update () override
 

Detailed Description

A dummy quote class that throws an exception when value is called.

Definition at line 36 of file exceptionquote.hpp.

Constructor & Destructor Documentation

◆ ExceptionQuote()

ExceptionQuote ( std::string  exception = "you've hit an 'ExceptionQuote'")

Definition at line 38 of file exceptionquote.hpp.

38: exception_(exception) {}

Member Function Documentation

◆ quote()

Real quote ( ) const

Definition at line 41 of file exceptionquote.hpp.

41 {
42 QL_FAIL(exception_);
43 return 0;
44 }

◆ value()

Real value ( ) const
override

Definition at line 48 of file exceptionquote.hpp.

48 {
49 QL_FAIL(exception_);
50 return 0;
51 }

◆ isValid()

bool isValid ( ) const
override

Definition at line 52 of file exceptionquote.hpp.

52 {
53 QL_FAIL(exception_);
54 return false;
55 }

◆ update()

void update ( )
override

Definition at line 59 of file exceptionquote.hpp.

59{ QL_FAIL(exception_); };

Member Data Documentation

◆ exception_

std::string exception_
protected

Definition at line 62 of file exceptionquote.hpp.