QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
Public Member Functions | List of all members
LastFixingQuote Class Reference

Quote adapter for the last fixing available of a given Index. More...

#include <lastfixingquote.hpp>

+ Inheritance diagram for LastFixingQuote:
+ Collaboration diagram for LastFixingQuote:

Public Member Functions

 LastFixingQuote (ext::shared_ptr< Index > index)
 
Quote interface
Real value () const override
 returns the current value More...
 
bool isValid () const override
 returns true if the Quote holds a valid value More...
 
Observer interface
void update () override
 
- Public Member Functions inherited from Quote
 ~Quote () override=default
 
virtual Real value () const =0
 returns the current value More...
 
virtual bool isValid () const =0
 returns true if the Quote holds a valid value More...
 
- 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 ()
 

LastFixingQuote interface

ext::shared_ptr< Indexindex_
 
const ext::shared_ptr< Index > & index () const
 
Date referenceDate () const
 

Additional Inherited Members

- Public Types inherited from Observer
typedef set_type::iterator iterator
 

Detailed Description

Quote adapter for the last fixing available of a given Index.

Definition at line 34 of file lastfixingquote.hpp.

Constructor & Destructor Documentation

◆ LastFixingQuote()

LastFixingQuote ( ext::shared_ptr< Index index)

Definition at line 26 of file lastfixingquote.cpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ value()

Real value ( ) const
overridevirtual

returns the current value

Implements Quote.

Definition at line 30 of file lastfixingquote.cpp.

+ Here is the call graph for this function:

◆ isValid()

bool isValid ( ) const
overridevirtual

returns true if the Quote holds a valid value

Implements Quote.

Definition at line 36 of file lastfixingquote.cpp.

+ Here is the caller graph for this function:

◆ 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.

Definition at line 45 of file lastfixingquote.hpp.

+ Here is the call graph for this function:

◆ index()

const ext::shared_ptr< Index > & index ( ) const

Definition at line 49 of file lastfixingquote.hpp.

◆ referenceDate()

Date referenceDate ( ) const

Definition at line 40 of file lastfixingquote.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ index_

ext::shared_ptr<Index> index_
protected

Definition at line 53 of file lastfixingquote.hpp.