Handle Class Template Reference#include <ql/handle.hpp>
List of all members.
Detailed Description
template<class Type>
class QuantLib::Handle< Type >
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.
- Precondition:
- Class "Type" must inherit from Observable
|
Public Member Functions |
| | Handle (const boost::shared_ptr< Type > &h=boost::shared_ptr< Type >(), bool registerAsObserver=true) |
| void | linkTo (const boost::shared_ptr< Type > &, bool registerAsObserver=true) |
|
const boost::shared_ptr< Type > & | currentLink () const |
| | dereferencing
|
|
const boost::shared_ptr< Type > & | operator-> () const |
|
bool | empty () const |
| | Checks if the contained shared pointer points to anything.
|
Constructor & Destructor Documentation
| Handle |
( |
const boost::shared_ptr< Type > & |
h = boost::shared_ptr< Type >(), |
|
|
bool |
registerAsObserver = true |
|
) |
[explicit] |
|
|
|
- Warning:
- see the documentation of the Link class for issues relatives to
registerAsObserver.
|
Member Function Documentation
| void linkTo |
( |
const boost::shared_ptr< Type > & |
, |
|
|
bool |
registerAsObserver = true |
|
) |
|
|
|
|
- Warning:
- see the documentation of the Link class for issues relatives to
registerAsObserver.
|
|