- QuantLib
- Handle
Shared handle to an observable. More...
#include <ql/handle.hpp>

Public Member Functions | |
| const boost::shared_ptr< T > & | currentLink () const |
| dereferencing | |
| const boost::shared_ptr< T > & | operator-> () const |
| const boost::shared_ptr< T > & | operator* () const |
| bool | empty () const |
| checks if the contained shared pointer points to anything | |
| operator boost::shared_ptr< Observable > () const | |
| allows registration as observable | |
| template<class U > | |
| bool | operator== (const Handle< U > &other) |
| equality test | |
| template<class U > | |
| bool | operator!= (const Handle< U > &other) |
| disequality test | |
| template<class U > | |
| bool | operator< (const Handle< U > &other) |
| strict weak ordering | |
Constructors | |
| |
| Handle (const boost::shared_ptr< T > &p=boost::shared_ptr< T >(), bool registerAsObserver=true) | |
| Handle (T *p, bool registerAsObserver=true) | |
Protected Attributes | |
| boost::shared_ptr< Link > | link_ |
Shared handle to an observable.
All copies of an instance of this class refer to the same observable by means of a relinkable smart pointer. When such pointer is relinked to another observable, the change will be propagated to all the copies.