Logo Search packages:      
Sourcecode: quantlib version File versions

QuantLib::Handle< T > Class Template Reference

#include <handle.hpp>

List of all members.

Detailed Description

template<class T>
class QuantLib::Handle< T >

Globally accessible relinkable pointer.

An instance of this class can be relinked to another shared pointer: such change will be propagated to all the copies of the instance.

Class T must inherit from Observable

Definition at line 87 of file handle.hpp.

Public Member Functions

const boost::shared_ptr< T > & currentLink () const
bool empty () const
 checks if the contained shared pointer points to anything
 Handle (const boost::shared_ptr< T > &h=boost::shared_ptr< T >(), bool registerAsObserver=true)
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
template<class U>
bool operator< (const Handle< U > &other)
 strict weak ordering
template<class U>
bool operator== (const Handle< U > &other)
 equality test
void swap (Handle< T > &other)
 swaps two handles

Private Attributes

boost::shared_ptr< Link< T > > link_

Related Functions

(Note that these are not member functions.)

template<class T>
void swap (Handle< T > &, Handle< T > &)

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

Generated by  Doxygen 1.6.0   Back to index