Logo Search packages:      
Sourcecode: quantlib version File versions  Download package

Public Member Functions | Protected Attributes

QuantLib::RelinkableHandle< T > Class Template Reference

Relinkable handle to an observable. More...

#include <handle.hpp>

Inheritance diagram for QuantLib::RelinkableHandle< T >:
Inheritance graph
[legend]
Collaboration diagram for QuantLib::RelinkableHandle< T >:
Collaboration graph
[legend]

List of all members.

Public Member Functions

const boost::shared_ptr< T > & currentLink () const
 dereferencing
bool empty () const
 checks if the contained shared pointer points to anything
void linkTo (const boost::shared_ptr< T > &, bool registerAsObserver=true)
 operator boost::shared_ptr< Observable > () const
 allows registration as observable
template<class U >
bool operator!= (const Handle< U > &other)
 disequality test
const boost::shared_ptr< T > & operator* () const
const boost::shared_ptr< T > & operator-> () const
template<class U >
bool operator< (const Handle< U > &other)
 strict weak ordering
template<class U >
bool operator== (const Handle< U > &other)
 equality test
 RelinkableHandle (const boost::shared_ptr< T > &p=boost::shared_ptr< T >(), bool registerAsObserver=true)
 RelinkableHandle (T *p, bool registerAsObserver=true)

Protected Attributes

boost::shared_ptr< Linklink_

Detailed Description

template<class T>
class QuantLib::RelinkableHandle< T >

Relinkable handle to an observable.

An instance of this class can be relinked so that it points to another observable. The change will be propagated to all handles that were created as copies of such instance.

Precondition:
Class T must inherit from Observable
Warning:
see the Handle documentation for issues relatives to registerAsObserver.

Definition at line 116 of file handle.hpp.


The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index