File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -47,3 +47,17 @@ cdef class HandleDefaultProbabilityTermStructure:
4747 self .handle = RelinkableHandle[_dts.DefaultProbabilityTermStructure](
4848 static_pointer_cast[_dts.DefaultProbabilityTermStructure](ts._thisptr),
4949 register_as_observer)
50+
51+ @property
52+ def current_link (self ):
53+ cdef DefaultProbabilityTermStructure instance = DefaultProbabilityTermStructure.__new__ (DefaultProbabilityTermStructure)
54+ if self .handle.empty():
55+ raise ValueError (" empty handle" )
56+ instance._thisptr = self .handle.currentLink()
57+ return instance
58+
59+ def link_to (self , DefaultProbabilityTermStructure ts , bool register_as_observer = True ):
60+ self .handle.linkTo(
61+ static_pointer_cast[_dts.DefaultProbabilityTermStructure](ts._thisptr),
62+ register_as_observer
63+ )
You can’t perform that action at this time.
0 commit comments