Handle Class Template Reference
#include <ql/handle.hpp>
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
- Examples:
-
BermudanSwaption.cpp, ConvertibleBonds.cpp, DiscreteHedging.cpp, EquityOption.cpp, and swapvaluation.cpp.
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
|
|
Member Function Documentation
|
|