QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
|
#include <handle.hpp>
Public Member Functions | |
Link (const ext::shared_ptr< T > &h, bool registerAsObserver) | |
Link (ext::shared_ptr< T > &&h, bool registerAsObserver) | |
void | linkTo (ext::shared_ptr< T >, bool registerAsObserver) |
bool | empty () const |
const ext::shared_ptr< T > & | currentLink () const |
void | update () override |
Public Member Functions inherited from Observable | |
Observable () | |
Observable (const Observable &) | |
Observable & | operator= (const Observable &) |
Observable (Observable &&)=delete | |
Observable & | operator= (Observable &&)=delete |
virtual | ~Observable ()=default |
void | notifyObservers () |
Public Member Functions inherited from Observer | |
Observer ()=default | |
Observer (const Observer &) | |
Observer & | operator= (const Observer &) |
virtual | ~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 | update ()=0 |
virtual void | deepUpdate () |
Private Attributes | |
ext::shared_ptr< T > | h_ |
bool | isObserver_ = false |
Additional Inherited Members | |
Public Types inherited from Observer | |
typedef set_type::iterator | iterator |
Definition at line 43 of file handle.hpp.
Definition at line 153 of file handle.hpp.
bool empty | ( | ) | const |
Definition at line 51 of file handle.hpp.
const ext::shared_ptr< T > & currentLink | ( | ) | const |
Definition at line 52 of file handle.hpp.
|
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 53 of file handle.hpp.
|
private |
Definition at line 56 of file handle.hpp.
|
private |
Definition at line 57 of file handle.hpp.